L_ILM_GETBACKCOLOR

Send this message to get the background color of the ImageList Control.

Parameter

Description

wParam

Ignored, use 0.

lParam

Pointer to a variable to be updated with the background color of the control.

Returns

SUCCESS

Function was successful

< 0

An error occurred. Refer to Return Codes.

Comments

Before using this message, you must allocate a variable of type COLORREF and pass the address of this variable in lParam.

The variable pointed to by lParam will be updated with the ImageList Control's current background color.

The associated macro is:

L_ImgListGetBackColor(hWnd, pcrBack)

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

See Also

Elements:

L_ILM_SETBACKCOLOR, L_ILM_GETBORDERCOLOR, L_ILM_SETBORDERCOLOR, L_ILM_GETSELOPTIONS, L_ILM_GETITEMOPTIONS

Topics:

Using the ImageList Control

 

Image List Control Messages

 

Using Color Values in LEADTOOLS

Example

L_INT ILM_GETBACKCOLORExample(HWND hCtrl) 
{ 
   if(IsWindow(hCtrl)) 
   { 
      L_INT nRet; 
      COLORREF crBack; 
 
      /* get current color */ 
      nRet = (L_INT)SendMessage(hCtrl, L_ILM_GETBACKCOLOR, 0, (LPARAM)&crBack); 
      /* change it and reset */ 
      if(crBack != RGB(190,190,190)) 
         crBack = RGB(190,190,190); 
      nRet = (L_INT)SendMessage(hCtrl, L_ILM_SETBACKCOLOR, 0, (LPARAM)&crBack); 
      RedrawWindow(hCtrl, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE); 
 
      return nRet; 
   } 
   else 
      return ERROR_INVALID_PARAMETER; 
} 
Help Version 20.0.2018.7.30
Products | Support | Contact Us | Copyright Notices
© 1991-2018 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help