SetAnimFromMemory method
Remarks
Changes, at run-time, one of the animations associated with a button.
Syntax
Visual Basic
control.SetAnimFromMemory (index as enumPictures, pDataInMemory as string, datasize as long) as boolean
Visual C++
BOOL control.SetAnimFromMemory (short index, VARIANT pDataInMemory, long datasize);
|
Parameter
|
Description
|
|
|
|
|
index
|
Numerical value that represents the index of the picture property to change. Supported values are the following:
|
Mnemonic constant
|
Value
|
Meaning
|
|
PICTURE_NORMAL
|
0
|
Changes the animation associated with 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 that represents the data size in bytes.
|
Visual Basic example:
Dim bitsavi As String
Dim length As Integer
bitsavi = LoadResData(101, "AVI")
length = LenB(bitsavi)
BtnEnh1.SetAviFromMemory 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;
BtnEnh1.SetAviFromMemory (PICTURE_NORMAL, va, size_of_data);
With this code the
Picture property will be changed using an AVI animation previously loaded in memory.
Return value
|
Value
|
Meaning
|
|
|
|
|
FALSE
|
The operation failed
|
|
TRUE
|
The operation was successful
|