Hello to everyone,

I have a standard MSVC++ 2012 project created with the project wizard as follows...

Is a MDI/MFC/Doc/View project
Has Tabbed Children Views
It has an extra Properties window created by the wizard called PropertiesWnd.cpp

PropertiesWnd.cpp uses a CMFCPropertyGridProperty control to display properties.
(I understand how to use this control)

When I click inside a ChildView window, I need for information about that view to be displayed in the properties control on PropertiesWnd.cpp.
Another way to word my Scenario is to say...
I need to access properties of the Child View class from the the PropertiesWnd class to update the properties control when I click the child view window.
Some Info...

You can't #include the ChildView.h file in the PropertiesWnd.cpp or .h file. It breaks the architecture.
Therefore, I dont understand the architecture rqmts to do this.

I tried to do this inside my PropertiesWnd.cpp � But it breaks the architecture because to do this I must #include the ChildView.h file inside PropertiesWnd.cpp or PropertiesWnd.h�

Inside a function I put...
CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->GetMainWnd();
CMDIChildWnd *pChild = (CMDIChildWnd*)pFrame->GetActiveFrame();
yourMDIView *pView = (yourMDIView*)pChild->GetActiveView();

// Now update the variable or member of your choice
pView->a = 1;

The code itself works, but the framework will not allow it.

So My Question Is:
How can I update my properties window with variables from the ChildView that I click on?
I need to be able to access the data of the ChildView from the PropertiesWnd.cpp


How can/should this be done?

Thank you very much for your help.