abmSetPictureFromMemory function
|
Remarks
|
Changes one of the button pictures loading its data from a picture stored in memory in BMP format.
|
|
Return value
|
|
Value
|
Meaning
|
|
|
|
|
FALSE
|
The operation failed
|
|
TRUE
|
The operation was successful
|
|
|
Syntax
|
long abmSetPictureFromMemory (
HWND hWndBtn,
short index,
LPCTSTR pData,
long sizeData
);
|
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)
|
|
|
|
pData
|
Pointer to picture data previously loaded in memory.
|
|
sizeData
|
Numerical value that represents the data size in bytes.
|
|
Visual Basic example
Dim bitspict As String
Dim length As Integer
bitspict = LoadResData(xxx, 2)
length = LenB(bitspict)
abmSetPictureFromMemory btn1.hWnd, PICTURE_NORMAL, bitspict, length
With this code the
Picture property will be changed using a bitmap identified by xxx (contained in a .RES file).
Visual C++ example
BYTE *pointer_to_bitmap_in_memory;
pointer_to_bitmap_in_memory = new BYTE[65536];
..
store the bitmap into the pointer_to_bitmap_in_memory location
..
abmSetPictureFromMemory (btn1.GetSafeHwnd (), PICTURE_NORMAL, (LPCTSTR) pointer_to_bitmap_in_memory, size_of_data);
delete pointer_to_bitmap_in_memory;
With this code the
Picture property will be changed using a bitmap previously loaded in memory:.