I have a 2012 MSVC++ MFC MDI application which uses a PropertiesWnd.cpp file. It is generated by the wizard when I create the MFC application and ask for it.
It is a class CPropertiesToolBar : public CMFCToolBar. It uses a CMFCPropertyGridProperty
control to display propertys info of whatever I choose to define.
My question isÖ
How do I access CMFCPropertyGridProperty inside PropertiesWnd.cpp correctly to set the values of the CMFCPropertyGridProperty from another class in another file in scope ?
Would I do something like this Ö
// in my header use
CMainFrame * pMainWnd;
pMainWnd = (CMainFrame *)AfxGetMainWnd();
//Then where I want to do something
CString * myString;
myString->Append("My New Data");
dwData = (DWORD_PTR)myString;
// Iím doing this from a utility class member, I must update the properties
// based on the mouse selections of the user
Or should I use some kind of message mapping ?
What is the best/correct way to do this ? Iíve looked everywhere and canít find an example of updating the CMFCPropertyGridProperty from another class.