|
-
May 27th, 1999, 02:04 AM
#1
Invoke OnUpdateButton1(CCmdUI* pCmdUI)???
In a dialog based application I've added a toolbar.
Member variable: CToolBar m_wndToolBar;
BOOL CTestDlg::OnInitDialog()
{
...
m_wndToolBar.Create(this);
m_wndToolBar.LoadToolBar(IDR_TOOLBAR1);
m_wndToolBar.ShowWindow(SW_SHOW);
m_wndToolBar.SetBarStyle(CBRS_ALIGN_TOP | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_FLOATING);
RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);
...
}
then using class wizard i've added two functions for each button:
void CTestDlg::OnButton1()
{
.....
}
void CTestDlg::OnUpdateButton1(CCmdUI* pCmdUI)
{
.....
}
There is no problem to invoke OnButton1() while pressing Button1.
What should I add to code to invoke OnUpdateButton1(CCmdUI* pCmdUI)???
Thanks in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|