History:
Buttons on a dialog bar can not be enabled and disabled
(see KBA 152376).
The answer is to have a handler for ON UPDATE COMMAND UI
to the button
void CMainFrame::OnUpdateButton1(CCmdUI *p)
{
p->Enable(TRUE);
}
so this is great it works, now I want to disable this
button when the operator clicks on a different button,
ie
void CMainFrame::OnPlayButton()
{
//Enable the Pause button
ExecuteFile(...); // a method to play a file
}
But I can not enable the pause button ! So can I
call the OnUpdateButton1(CCmdUI *p)
method ? If so how do I get the CCmdUI pointer to the
CButton ?
Thanks.
Buttons on a dialog bar can not be enabled and disabled
(see KBA 152376).
The answer is to have a handler for ON UPDATE COMMAND UI
to the button
void CMainFrame::OnUpdateButton1(CCmdUI *p)
{
p->Enable(TRUE);
}
so this is great it works, now I want to disable this
button when the operator clicks on a different button,
ie
void CMainFrame::OnPlayButton()
{
//Enable the Pause button
ExecuteFile(...); // a method to play a file
}
But I can not enable the pause button ! So can I
call the OnUpdateButton1(CCmdUI *p)
method ? If so how do I get the CCmdUI pointer to the
CButton ?
Thanks.