i just get stuck to load *.RES into ImageList.
i can load Resource from File into Imagelist() and also Image when have hBitmap / hIcon
under Xbase++ i can use LoadResource() but need to assign it to Object to get hBitmap / hIcon
how under Fivewin
![Question :?:](./images/smilies/icon_question.gif)
Code: Select all | Expand
if ValType( oIcon ) == "C"
if File( oIcon )
DEFINE ICON oIco FILENAME oIcon
else
DEFINE ICON oIco RESOURCE oIcon
endif
else
oIco = oIcon
endif
Code: Select all | Expand
DEFINE BITMAP oBmpImage RESOURCE cString
// how about oBmpMask ?
Add( oBmpImage, oBmpMask )
Code: Select all | Expand
::oImageListL = TImageList():New()
::oImageListL:Add( oBmp1 := TBitmap():Define( "folder",, ::oWnd ),;
oBmp2 := TBitmap():Define( "fldmask",, ::oWnd ) )
Code: Select all | Expand
#ifdef Use_Icon
iImage_0 := oGrid:oImageListSmall:AddIcon( acIcon[ ii ] )
iImage := MAX( 0, oGrid:oImageListBig:AddIcon( acIcon[ ii ] ) )
#else
iImage_0 := oGrid:oImageListSmall:Add( oBmp1 := TBitmap():Define( acBitmaps[ ii ],, oDlg ),;
oBmp2 := TBitmap():Define( acBitmaps[ ii ],, oDlg ) )
iImage := MAX( 0, oGrid:oImageListBig:Add( oBmp1 := TBitmap():Define( acBitmaps[ ii ],, oDlg ),;
oBmp2 := TBitmap():Define( acBitmaps[ ii ],, oDlg ) ) )
#endif
LV_ADDITEMS( oGrid:hLv, aItem, iImage )
#ifdef Use_Icon
DestroyIcon( iImage_0 )
DestroyIcon( iImage )
#else
DeleteObject( iImage_0 )
DeleteObject( iImage )
DeleteObject( oBmp1 )
DeleteObject( oBmp2 )
#endif
i do not know what "masked bitmap" mean ...Antonio Linares wrote:Are you properly providing it a masked bitmap for each one ?