Gets the number of pages in an MRC file.
#include "ltsgm.h"
L_LTSGM_API L_INT L_MrcGetPagesCount(pszFileName, pnPages)
Character string containing the name of the MRC file.
Pointer to a variable to be updated with the number of pages from the MRC file.
| Value | Meaning |
|---|---|
| SUCCESS | The function was successful. |
| <= 0 | An error occurred. Refer to Return Codes |
Use this function to get the number of pages in an MRC file.
L_INT MrcGetPagesCountExample(HWND hWnd,L_TCHAR* pszFileName){L_INT nPages, nRet;L_TCHAR szMessage[256];nRet = L_MrcGetPagesCount(pszFileName, &nPages);if (nRet != SUCCESS){lstrcpy(szMessage, TEXT("Error getting pages count"));return nRet;}elsewsprintf(szMessage, TEXT("%s file contains %d pages"), pszFileName, nPages);MessageBox(hWnd, szMessage, NULL, MB_OK);return SUCCESS;}