关联在对话框中的按钮与 CBitmapButton 选件类的对象,按名称加载位图,并调整按钮以位图。
BOOL AutoLoad(
UINT nID,
CWnd* pParent
);
参数
nID
按钮的控件ID.pParent
为拥有按钮的对象的指针。
返回值
非零,如果成功;否则为0。
备注
使用 AutoLoad 函数初始化在对话框的所有者描述按钮作为位图按钮。有关使用此函数在 CBitmapButton 选件类的备注。
示例
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);
要求
Header: afxext.h