abmSetAnimFromMemory function
|
Remarks
|
Available only with Professional Version.
Changes one of the animations associated to the button pictures.
|
|
Return value
|
|
Value
|
Meaning
|
|
|
|
|
FALSE
|
The operation failed
|
|
TRUE
|
The operation was successful
|
|
|
Syntax
|
long abmSetAnimFromMemory (
HWND hWndBtn,
short index,
VARIANT pDataInMemory,
long datasize
);
|
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 animation associated to the Picture property.
|
|
PICTURE_PRESSED (1)
|
|
|
PICTURE_MOUSEOVER (2)
|
|
|
|
pDataInMemory
|
Variant parameter containing the pointer to AVI or GIF data previously loaded in memory.
|
|
datasize
|
Numerical value representing the data size in bytes.
|
|
Visual Basic 6 example
Dim bitsavi As String
Dim length As Integer
bitsavi = LoadResData(xxx, "AVI")
length = LenB(bitsavi)
abmSetAviFromMemory btn1.hWnd, PICTURE_NORMAL, bitsavi, length
With this code the
Picture property will be changed using an AVI animation 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_avi_in_memory;
abmSetAviFromMemory (btn1.GetSafeHwnd (), PICTURE_NORMAL, va, size_of_data);
With this code the
Picture property will be changed using an AVI animation previously loaded in memory.