TE Edit Control Win32 / Win64 Help
Product page

TerSetPaper

Set custom paper size and orientation.

BOOL TerSetPaper(hWnd, size, orient, refresh)
BOOL TerSetPaperEx(hWnd, size, width, length, orient, refresh)
HWND hWnd;The handle of the window to be accessed
int size;The paper size is given by one of the Windows SDK DMPAPER_ constant. You can also set this parameter to 0 to use the 'width' and 'length' parameters to specify the paper size (TerSetPaperEx only).
int width;Custom paper width. This parameter is valid only for the printers which support custom paper sizes.
int length;Custom paper length. This parameter is valid only for the printers which support custom paper sizes.
int orient;The paper orientation is given by one of the Windows SDK DMORIENT_ constant. Set this argument to -1 to leave the current document orientation unchanged
BOOL refresh;TRUE to refresh the window after this operation.

Return Value: This function returns TRUE when successful.