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_HDR | Regular page header |
LFLAG_FTR | Regular page footer |
LFLAG_FHDR | First page header |
LFLAG_FFTR | First page footer |
LFLAG_RHDR | Right (odd) page header |
LFLAG_RFTR | Right (odd) page footer |
LFLAG_LHDR | Left (even) page header |
LFLAG_LFTR | Left (even) page footer |
Example:
int flag=TerHdrFtrExists(hWnd, tc.SECT_ALL);
if ((flag and LFLAG_HDR) <> 0) then RegularPageHeader
found.