TE Edit Control Win32 / Win64 Help
Product page

TerSetSectPageSize

Set the page size for a section.

BOOL TerSetSectPageSize(hWnd, sect, PageSize, PageWidth, PageHeight, repaint)
HWND hWnd;Window handle to access
int sect;Section id to apply changes. You can also set this parameter to SECT_CUR to edit the current section, or set it to SECT_ALL to apply changes to all sections in the document.
int PageSize;

Use one of the following Windows SDK defined constants:

Constant Value
DMPAPER_LETTER 1
DMPAPER_LEGAL 5
DMPAPER_LEDGER 4
DMPAPER_TABLOID 3
DMPAPER_STATEMENT 6
DMPAPER_EXECUTIVE 7
DMPAPER_A3 8
DMPAPER_A4 9
DMPAPER_A5 11
DMPAPER_B4 12
DMPAPER_B5 13

If you need to use a paper size not listed above, please set the PageSize argument to zero and specify the page width and height using the next two arguments.

int PageWidth;The page width in twips units. This argument is ignored if the PageSize is set to one of the defined page sizes listed above.
int PageHeight;The page height in twips units. This argument is ignored if the PageSize is set to one of the defined page sizes listed above
BOOL repaint;TRUE to refresh screen after this operation.

Return Value: The function returns TRUE when successful.