CDialogBar ctls
12-Jul-94 02:57:02
Sb: #30618-CDialogBar ctls
Fm: Thomas Zeisluft [MVP] 100034,1615
To: Bruce McCarroll 76500,1210
Bruce,
enabling/diabling of controls should be done using MFC's OnUpdateCommandUI
mechanism.
Add the following to your view:
to the .h
afx_msg void OnUpdateSortButton(CCmdUI* pCmdUI);
and the following to the .cpp
//message map entry
ON_UPDATE_COMMAND_UI( IDC_SORT, OnUpdateSortButton )
// actual handler
void CYourView::OnUpdateSortButton(CCmdUI* pCmdUI)
{
// TODO: Add your control notification handler code here
pCmdUI->Enable( TRUE/FALSE ); // supply argument as needed
}
Let me know if it doesn't work !
ThomasZ