Copyright © 2002-2009 MultiMedia Soft 
Return to index  
 
abmSetPictureFromHandle function 
 
Remarks
Changes one of the pictures associated to the button.
Return value
Value
Meaning
 
 
FALSE
The operation failed
TRUE
The operation was successful
Syntax
 
long abmSetPictureFromHandle
HWND hWndBtn
short index
long hBmp 
); 
 
 
Parameters
Description
hWndBtn
Windows handle associated to the button.
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 Picture property.
PICTURE_PRESSED (1)
Changes the PicturePressed property.
PICTURE_MOUSEOVER (2)
Changes the PictureMouseOver property.
PICTURE_CUSTOM (3)
Changes the PictureCustom property
PICTURE_TEXTURE (4)
Changes the Texture property
PICTURE_DISABLED (5)
Changes the PictureDisabled property
hBmp
Handle of the new bitmap to use for the selected property.
 
Visual Basic example 
 
abmSetPictureFromHandle btn1.hWnd, PICTURE_NORMAL, LoadResPicture(xxx, vbResBitmap).Handle 
With this code the Picture property will be changed using a bitmap identified by xxx (contained in a .RES file). 
 
Visual C++ example 
 
HBITMAP hBitmap = LoadBitmap (hInstance, id); 
abmSetPictureFromHandle (btn1.GetSafeHwnd (), PICTURE_NORMAL, (OLE_HANDLE) hBitmap); 
 
With this code the Picture property will be changed using a bitmap, identified by the "id" parameter, loaded from the application resources. 
 
 
 
 
 
 
 
Copyright © 2002-2009 MultiMedia Soft 
Return to index