BOOL AutoLoad( UINT nID, CWnd* pParent );
Return Value
Nonzero if successful; otherwise 0.
Parameters
nID
The button’s control ID.
pParent
Pointer to the object that owns the button.
Remarks
Associates a button in a dialog box with an object of the CBitmapButton class, loads the bitmap(s) by name, and sizes the button to fit the bitmap.
Use the AutoLoad function to initialize an owner-draw button in a dialog box as a bitmap button. Instructions for using this function are in the remarks for the CBitmapButton class.
Example
CBitmapButton myButton;
// Initialize the owner-drawn button with the id IDC_MYBUTTON as a bitmap
// button. This code is used in the OnInitDialog handler of my dialog.
myButton.AutoLoad(IDC_MYBUTTON, this);
CBitmapButton Overview | Class Members | Hierarchy Chart
See Also CBitmapButton::LoadBitmaps, CBitmapButton::SizeToContent