L_ILM_GETPAGECOUNT

Send this message to get the number of pages of items in the ImageList Control.

Parameter

Description

wParam

Ignored, use 0.

lParam

Ignored, use 0.

Returns

>=0

The number of pages

< 0

An error occurred. Refer to Return Codes.

Comments

This message will return the total number of pages of items in the ImageList Control. Pages are calculated using the total number of rows or columns (depending on the scroll style) and the total number of rows or columns (depending on the scroll style) that are completely visible in the ImageList Control's client area.

The associated macro is:

L_ImgListGetPageCount(hWnd)

For a complete list of available macros, refer to the Ltlst.h file.

See Also

Elements:

L_ILM_GETPAGE, L_ILM_GETITEMCOUNT, L_ILM_GETROWCOUNT, L_ILM_GETCOLCOUNT, L_ILM_GETSELCOUNT, L_ILM_GETSCROLLSTYLE

Topics:

Using the ImageList Control

 

Image List Control Messages

Example

L_VOID TestFunc22(HWND hWnd)
{
   L_INT32 lCount;
   L_INT32 lPage;
   L_TCHAR buf[200];
   if(IsWindow(hWnd))
   {
      /* get current page count */
      lCount = (L_INT32)SendMessage(hWnd, L_ILM_GETPAGECOUNT, 0, 0L);
      /* get current page */
      lPage = (L_INT32)SendMessage(hWnd, L_ILM_GETPAGE, 0, 0L);
      wsprintf(buf, TEXT("Page: %ld of %ld Pages!"), lPage, lCount);
      MessageBox(hWnd, buf, TEXT("Page Count"), MB_OK);
   }
}