Document telling DialogBar to Update
-
Hello, In my application, it would be most convenient for a CDocument method to send a message to a DialogBar to update it's UI with the latest Document values (Document values are updated by a second DialogBar). My question is (A) Although this may not be the best OO design, is this "OK"? and (B) What's the best way to implement this? (detailed code not necessary). Thanks! JennyP
-
Hello, In my application, it would be most convenient for a CDocument method to send a message to a DialogBar to update it's UI with the latest Document values (Document values are updated by a second DialogBar). My question is (A) Although this may not be the best OO design, is this "OK"? and (B) What's the best way to implement this? (detailed code not necessary). Thanks! JennyP
You may consider overriding CDialogBar::OnUpdateCmdUI or adding UPDATE_CMD_UI for particular controls. Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
-
You may consider overriding CDialogBar::OnUpdateCmdUI or adding UPDATE_CMD_UI for particular controls. Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
Tomasz is right! Just use UPDATE_CMD_UI macro, you won't have to send message to your dialog bar. The document needs to update only its view(s). The frame window should take care about updating the dialog bar, menus, etc.. VOTD:"5. The Lord loves righteousness and justice; the Earth is full of his unfailing love. "-Psalm 33:5