LImageListControl::SortExt

#include "ltwrappr.h"

L_INT LImageListControl::SortExt(pSortOptions)

pLILSORTOPTIONS pSortOptions;

pointer to a structure

Sorts 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

pSortOptions

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

Returns

SUCCESS

The function was successful.

< 0

An error occurred. Refer to Return Codes.

Comments

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

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

Required DLLs and Libraries

LTDISLTFILLTIMG

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Win32, x64.

See Also

Functions:

LImageListControl::Sort, LImageListControl::GetColumnCount, LImageListControl::Clear

Topics:

Using the ImageList Control

 

Raster Image Functions: Displaying Images

Example

L_INT LImageListControl__SortExtExample(HWND hWnd, LImageListControl& ImgList) 
 
{ 
   L_INT nRet; 
   HWND hList; 
   LILSORTOPTIONS SortOptions;  
 
   if(IsWindow(hWnd))  
 
   { 
      hList = ImgList.CreateControl(hWnd, 0) ; 
 
      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 */ 
 
      nRet = ImgList.SortExt(&SortOptions);  
      if(nRet != SUCCESS) 
         return nRet; 
 
      /* update the control */ 
 
      RedrawWindow( hWnd, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);  
 
   } 
 
   return SUCCESS; 
 
} 
Help Version 20.0.2020.4.5
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help