Send this message to set the item selection bitmap and transparent color for the ImageList Control.
COLORREF value to be used as the transparent color.
Pointer to the bitmap to use as the selection bitmap.
Value | Meaning |
---|---|
< 0 | An error occurred. Refer to Return Codes. |
Use this message to set a user-defined bitmap to be used to display selected items when the selection style is set to SELECTIONSTYLE_USERBITMAP. The bitmap that you specify will be drawn with the specified color as transparent, and will be centered around each selected item.
The associated macro is:
For a complete list of available macros, refer to the Ltlst.h file.
this sample loads a bitmap from a resource as a DDB,
converts it to a DDB, and then sets that as the selection bitmap
L_INT ILM_SETSELBITMAPExample(HWND hWnd, HWND hCtrl,HINSTANCE hInst)
{
HBITMAP hBitmap=NULL;
BITMAPHANDLE Bitmap;
HDC hDC=NULL;
LILSELOPTION Opt;
if(IsWindow(hCtrl))
{
/* get current selection options */
SendMessage(hCtrl, L_ILM_GETSELOPTIONS, 0, (LPARAM)&Opt);
hBitmap = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_FLAG));
if(hBitmap)
{
hDC = GetDC(hWnd);
if(L_ConvertFromDDB(hDC, &Bitmap, sizeof(BITMAPHANDLE), hBitmap, NULL)==SUCCESS)
{
SendMessage(hCtrl, L_ILM_SETSELBITMAP, (WPARAM)RGB(0,255,0), (LPARAM)&Bitmap);
L_FreeBitmap(&Bitmap);
}
DeleteObject(hBitmap);
ReleaseDC(hWnd, hDC);
}
Opt.uSelectionStyle = SELECTIONSTYLE_USERBITMAP;
SendMessage(hCtrl, L_ILM_SETSELOPTIONS, 0, (LPARAM)&Opt);
RedrawWindow(hCtrl, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
}
return SUCCESS;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.