Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.11.1
LEADTOOLS Raster Imaging C DLL Help

L_ILM_SORTEXT

Show in webframe

Send this message to sort the items in the ImageList Control based on their text or Extended Text attributes referenced in the pTextExt member of the LILITEM structure.

Parameter

Description

wParam

Ignored, use 0.

lParam

Pointer to the LILSORTOPTIONS structure that contains the sorting options to be used.

Returns

SUCCESS

Function was successful.

<0

An error occurred. Refer to Error Codes.

Comments

The ImageList Control items will be sorted according to the options in the structure pointed to by lParam.

You must set the uStructSize member of the LILSORTOPTIONS structure before using this message.

The associated macro is:

L_ImgListSortExt(hWnd, pSortOptions)

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

See Also

Elements:

L_ILM_SORT, L_ILM_GETITEMCOUNT, L_ILM_CLEAR

Topics:

Using the ImageList Control

 

Image List Control Messages

Example

L_INT ILM_SORTEXTExample(HWND hCtrl)
{
   if(IsWindow(hCtrl))
   {
      LILSORTOPTIONS SortOptions;

      ZeroMemory(&SortOptions, sizeof(LILSORTOPTIONS));
      SortOptions.uStructSize = sizeof(LILSORTOPTIONS);
      SortOptions.bAscending = TRUE; 
      SortOptions.bCaseSensitive = TRUE; 
      SortOptions.bUseExtText = FALSE; 

      /* sort items in Ascending, case Sensitive, and using Text string */
      L_INT nRet = (L_INT)SendMessage(hCtrl, L_ILM_SORTEXT, (WPARAM)0, (LPARAM)(&SortOptions));
      /* update the control */
      RedrawWindow(hCtrl, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);

      return nRet;
   }
   else
      return ERROR_INVALID_PARAMETER;
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.