TE Edit Control Win32 / Win64 Help
Product page

TerGetMarginEx

Retrieve the margin values for a section in the document.

int TerGetMarginEx(hWnd,sect,left,right,top,bottom,header,footer)
HWND hWnd;The handle of the window to be accessed
int sect;The section id to modify. This parameter can assume a value between 0 and 'TotalSects-1'. It can also be set to SECT_CUR to specify the current section.
LPINT left;The location to retrieve the left margin value in twip units.
LPINT right;The location to retrieve the right margin value in twip units.
LPINT top;The location to retrieve the top margin value in twip units.
LPINT bottom;The location to retrieve the bottom margin value in twip units.
LPINT header;The location to retrieve the distance of the header text from the top of the page.
LPINT footer;The location to retrieve the distance of the footer text from the bottom of the page.

Comment: Any of the location variables can be set to NULL, in which case the editor ignores the argument.

Return Value: This function returns the total number of sections in the document if successful. Otherwise it returns 0.