L_ILM_GETITEMOPTIONS

Send this message to get the ImageList Control's item display options.

Parameters

wParam

Ignored, use 0.

lParam

Pointer to LILITEMOPTION structure to be filled with current display options.

Returns

Value Meaning
SUCCESS Function was successful
< 0 An error occurred. Refer to Return Codes.

Comments

The structure pointed to by lParam will be updated with the ImageList Control's current display options.

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

The default option values are:

Option Default value
uVerticalSpacing 5
uHorizontalSpacing 5
uWidth 115
uHeight 115
crBackground GetSysColor(COLOR_BTNFACE)
bDisplayItemText TRUE
crForeground RGB(0,0,0)
hFont NULL (Times New Roman, 8 point)

The associated macro is:

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

See Also

Elements

Topics

Example

L_INT ILM_GETITEMOPTIONSExample(HWND hCtrl) 
{ 
   if(IsWindow(hCtrl)) 
   { 
      LILITEMOPTION Opt; /* item options structure */ 
      L_INT nRet; 
 
      ZeroMemory(&Opt, sizeof(LILITEMOPTION)); 
      ///* get current item options */ 
      Opt.uStructSize = sizeof(LILITEMOPTION); 
 
      SendMessage(hCtrl, L_ILM_GETITEMOPTIONS, 0, (LPARAM)&Opt); 
 
      /* now, set some new options */ 
      Opt.uVerticalSpacing   = 10; 
      Opt.uHorizontalSpacing = 10; 
      if(Opt.uWidth < 100) 
         Opt.uWidth=100; 
      if(Opt.uHeight < 100) 
         Opt.uHeight=100; 
      Opt.crBackground       = RGB(100,100,100); 
      Opt.bDisplayItemText   = TRUE; 
      Opt.crForeground       = RGB(255,0,0); 
      nRet = (L_INT)SendMessage(hCtrl, L_ILM_SETITEMOPTIONS, 0, (LPARAM)&Opt); 
 
      /* update the control */ 
      RedrawWindow(hCtrl, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE); 
      return nRet; 
   } 
   else 
      return ERROR_INVALID_PARAMETER; 
} 
Help Version 20.0.2020.4.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help