SetPictureFromMemory method |
|
Remarks Changes at runtime one of the button pictures loading its data from a picture stored in memory in BMP format.
Syntax Visual Basic control.SetPictureFromMemory (index as enumPictures, pDataInMemory as string, datasize as long) as integer
Visual C++ BOOL control.SetPictureFromMemory (long index, VARIANT pDataInMemory, long datasize);
Visual Basic example
Dim bitspict As String Dim length As Integer bitspict = LoadResData(xxx, 2) length = LenB(bitspict) BtnEnh1.SetPictureFromMemory 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
VARIANT va; VariantInit (&va); va.vt = VT_BYREF | VT_UI1; va.pbVal = (BYTE *) pointer_to_bitmap_in_memory; BtnEnh1.SetPictureFromMemory (PICTURE_NORMAL, va, size_of_data); With this code the Picture property will be changed using a bitmap previously loaded in memory.
Return value
|