abmSetPictureFromHandle function
|
Remarks
|
Available only with Professional Version.
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)
|
|
|
PICTURE_PRESSED (1)
|
|
|
PICTURE_MOUSEOVER (2)
|
|
|
PICTURE_CUSTOM (3)
|
|
|
PICTURE_TEXTURE (4)
|
|
|
PICTURE_DISABLED (5)
|
|
|
|
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.