Accessing CFooDoc CFooView from CFooDlg
-
Hello, I just can't find how to access my current Doc or View class from my Dialog. I have a simple document application, and my dialog is a toolbar (http://www.codeproject.com/miscctrl/rollupctrl.asp). If I click on a button of my toolbar, it executes : void CFooDlg::OnButtonMyAction() So I want here to access my current document, update it, and then update the view. It looks like a very basic question, but I can't figure out how to do that. Thank you for your help, loic
-
Hello, I just can't find how to access my current Doc or View class from my Dialog. I have a simple document application, and my dialog is a toolbar (http://www.codeproject.com/miscctrl/rollupctrl.asp). If I click on a button of my toolbar, it executes : void CFooDlg::OnButtonMyAction() So I want here to access my current document, update it, and then update the view. It looks like a very basic question, but I can't figure out how to do that. Thank you for your help, loic
If your dialog is a toolbar, wht you shoukld do is handle the action (button pressed, or other) on your doc class. You can use the class wizard for that, or you can do it by hand and add an entry on the DOC message map to catch the action. Good luck. Hernan
-
If your dialog is a toolbar, wht you shoukld do is handle the action (button pressed, or other) on your doc class. You can use the class wizard for that, or you can do it by hand and add an entry on the DOC message map to catch the action. Good luck. Hernan
-
:) thx, I will do that through the associate view, so I can easily manage the redraw of the data. loic
Easier and better if you do that in the document and then call UpdateAllViews(NULL);
-
Easier and better if you do that in the document and then call UpdateAllViews(NULL);