Copyright © 2002-2009 MultiMedia Soft 
Return to index  
 
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)
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
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:. 
 
 
 
 
 
 
 
Copyright © 2002-2009 MultiMedia Soft 
Return to index