89
Chapter 6: ActiveX Controls
VSpin User Guide
Setting Up Properties
Overview Properties are variables whose values can be set or retrieved by the
container application.
ControlPicture Description
Retrieves a picture of the VSpin bitmap that can be used in the
container application.
Example
This example paints a VSpin bitmap over a button.
Visual Basic Visual C++
‘Assume that there is a button
‘named Command1 on the
‘current form. You must set the
‘Style property of Command1 to
Graphical”
Command1.Picture =
VSpin1.ControlPicture
/* The CPicture class is imported into
your project when the ActiveX is
installed */
CButton button;
// Create a button
CPicture VSpinPic;
VSpinPic =
m_VSpin.GetControlPicture();
// Retrieve the picture
button.SetBitmap((HBITMAP)
VSpinPic.GetHandle());
/*Paint the bitmap onto the button*/