Updating controls on a CFormView
Posted on 2000-03-23
I have an app that is based on Doc/View, and also several other classes namely, CBugsWorld, CBug and CGrid. I also have two views, the main view (CView) created by MFC and another view CInfoView (VformView). In the document header I have a public variable CBugsWorld Bugworld.
In CView OnTimer I call a method of the CBugsWorld class through the document ie.
CDocument* pDoc = GetDocument();
When some variables in the CBugsWorld class or any class it includes change, I would like to update some labels in the CInfoView view.
When I tried to add member variables for the labels to CInfoView throuogh ClassWizard, it does not list the Labels in the Member variables pane.
I know this can be done manually and it is not the main concern. The main concern is that I don't know how the Doc/View interacts.
I would like someone to give instructions of the steps I need to perform in order to update controls (of whathever kind) in the CInfoView as well some dialogs I have. I simply don't understand the theory of the Doc/View and seems complex.
I can handle dialogs, classes etc except the doc/view paradigm