Copyright © 2002-2009 MultiMedia Soft 
Return to index  
 
abmCellsSetPictureFromHandle function 
 
Remarks
Changes one of the pictures associated to the cell identified by a UniqueID identifier. 
Further information about cells management can be found inside the How to manage cells section.
Return value
Value
Meaning
 
 
FALSE
The operation failed
TRUE
The operation was successful
Syntax
BOOL abmCellsSetPictureFromHandle
HWND hWndBtn
short nUniqueID
short index, 
long hBmp 
); 
 
 
Parameters
Description
hWndBtn
Windows handle associated to the button.
nUniqueID
Numerical value representing the cell's unique identifier.
index
Numerical value that represents the index of the picture property to change. Supported values are the following: 
Value
Meaning
PICTURE_NORMAL (0)
Changes the cell's PictureNormal property.
PICTURE_DISABLED (5)
Changes the cell's PictureDisabled property
hBmp
Handle of the new bitmap to use for the selected property.
 
Visual Basic example 
 
Picture2.Picture = "c:\mypicture.bmp" 
abmCellsSetPictureFromHandle Command1.hwnd, 1000, PICTURE_NORMAL, Picture2.Picture.Handle 
With this code the cell with UniqueID 1000 will have its PictureNormal property changed using a bitmap obtained from a PictureBox control named Picture2. 
 
Visual C++ example 
 
HWND hWndBtn = GetDlgItem (IDC_BUTTON)->GetSafeHwnd (); 
HBITMAP hBitmap = LoadBitmap (hInstance, id); 
abmCellsSetPictureFromHandle (hWndBtn, 1000, PICTURE_NOTRMAL, hBitmap); 
With this code the cell with UniqueID 1000 will have its PictureNormal property changed using a bitmap, with identifier "id", retrieved from the application's resources. 
 
 
 
 
 
 
 
Copyright © 2002-2009 MultiMedia Soft 
Return to index