Using CBitmapButton in CDialogBar and CFormViewID: Q98041
|
BOOL CMyDialogBar::Create(CWnd* pParent, UINT nIDTemplate,
UINT nStyle, UINT nID)
{
// Call base class create to create the dialog bar window.
BOOL bReturn = CDialogBar::Create(pParent, nIDTemplate,
nStyle, nID);
// Load bitmaps for the button and attach
// to the control in the dialog box.
if (bReturn)
m_MyBitmapButton.AutoLoad(IDC_MYBITMAPBUTTON, this);
return bReturn;
}
To use a CBitmapButton with a CFormView, call AutoLoad() in the CFormView
OnInitialUpdate() function. In the following code, which demonstrates this,
the CMyFormView class is derived from CFormView and m_MyBitmapButton is a
CBitmapButton member of CMyFormView:
void CMyFormView::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
m_MyBitmapButton.AutoLoad(IDC_MYBITMAPBUTTON, this);
}
Additional query words: kbinf 1.00 1.50 1.51 1.52 2.00 2.10 2.50 2.51 2.52 3.00 3.10 4.00 3.10
Keywords : kbMFC KbUIDesign kbVC
Version : 1.00 1.50 1.51 1.52 | 1.00 2.00
Platform : NT WINDOWS
Issue type :
Last Reviewed: August 2, 1999