Displays selected items using the specified user-defined bitmap.
#include "ltwrappr.h"
L_INT LImageListControl::SetSelectionBitmap(crTransparent, pBitmap)
Color value of the transparent color.
Pointer to an LBitmapBase object that references the bitmap to use as the selection bitmap.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Displays selected items using the specified user-defined bitmap when the selection style has been set to SELECTIONSTYLE_USERBITMAP using LImageListControl::SetSelectionOptions. The specified bitmap will be drawn with the specified color as transparent, and will be centered around each selected item.
Win32, x64.
L_INT LImageListControl__SetSelectionBitmapExample(HWND hParent)
{
L_INT nRet;
LImageListControl m_ImgList;
LILSELOPTION SelOpt;
SelOpt.uStructSize = sizeof(LILSELOPTION);
if(m_ImgList.CreateControl(hParent,0) == NULL)
return FAILURE;
// get current options
nRet = m_ImgList.GetSelectionOptions(&SelOpt);
if(nRet != SUCCESS)
return nRet;
// set some options
if(SelOpt.uAllowSelection != ALLOWSELECTION_SINGLE)
SelOpt.uAllowSelection = ALLOWSELECTION_SINGLE;
LBitmapBase SelBitmap;
nRet = SelBitmap.Load(MAKE_IMAGE_PATH(TEXT("ULAY1.BMP")));
if(nRet != SUCCESS)
return nRet;
nRet = m_ImgList.SetSelectionBitmap(RGB(255,255,255), &SelBitmap);
if(nRet != SUCCESS)
return nRet;
if(SelOpt.uSelectionStyle != SELECTIONSTYLE_USERBITMAP)
SelOpt.uSelectionStyle = SELECTIONSTYLE_USERBITMAP;
nRet = m_ImgList.SetSelectionOptions(&SelOpt);
if(nRet < 1)
return nRet;
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