TE Edit Control Win32 / Win64 Help
Product page

TerHdrFtrExists

Check if headers or footers exists in the document

int TerHdrFtrExists(hWnd, SectId)
HWND hWnd;The handle of the window to be accessed
int SectId;The sequential section id of the section to search the headers or footers. You can also set this parameter to SECT_ALL to search the entire document, or set to SECT_CUR to search the current section only.

Return Value: This function returns a flag value. The following constant bits in the flag value indicate the existence of the headers and footers. You can use the 'And' operator to check if a particular header or footer exists.

A zero return value indicates that no header or footer exists in the document.

LFLAG_HDRRegular page header
LFLAG_FTRRegular page footer
LFLAG_FHDRFirst page header
LFLAG_FFTRFirst page footer
LFLAG_RHDRRight (odd) page header
LFLAG_RFTRRight (odd) page footer
LFLAG_LHDRLeft (even) page header
LFLAG_LFTRLeft (even) page footer

Example:

int flag=TerHdrFtrExists(hWnd, tc.SECT_ALL);
if ((flag and LFLAG_HDR) <> 0) then RegularPageHeader
found.