Updating toolbar buttons or menu
-
Hi, Here it goes: the user of my program click a button of a toolbar. Then a function is executed corresponding to this button. I am using a document/view architecture with VC++ 6 and I am able to change the state of the button (i.e. grayed, checked…) only once the function is finished. I would like to be able to update the state of the toolbar button of menu while executing the function:
void CMyProjectView::OnButtonDown() { // initialize variables // change the state of toolbar buttons // Do code here // restore the starting state of toolbar buttons }
Thanks, Rno -
Hi, Here it goes: the user of my program click a button of a toolbar. Then a function is executed corresponding to this button. I am using a document/view architecture with VC++ 6 and I am able to change the state of the button (i.e. grayed, checked…) only once the function is finished. I would like to be able to update the state of the toolbar button of menu while executing the function:
void CMyProjectView::OnButtonDown() { // initialize variables // change the state of toolbar buttons // Do code here // restore the starting state of toolbar buttons }
Thanks, RnoEnableWindow() INTP
-
EnableWindow() INTP
-
- Create an OnUpdateButton() for the button you want to disable. 2) Type in pCmdUI->Enable(FALSE); ( or pCmdUI->Enable(); ). 3) Place a break point on step (2). 4) Run your application in debug and start stepping. OR 1) Goto the MFC\SRC directory 2) Open BARTOOL.CPP 3) Search for CToolCmdUI::Enable You should have no problem figuring it out from there. I hoped this helped! INTP