Home > Software engineering >  MFC in how to call another class in a class definition of pointer variable
MFC in how to call another class in a class definition of pointer variable

Time:10-05

Variables defined in MainFrm. H vtkPolyData * m_image;
And in MainFrm. CPP will data storage to m_image
If you want to be in the MainView. CPP in call on the processing to do?
Please give guidance...

CodePudding user response:

Write a function view, add a pointer variable
Put it in the frame passed

Or

In the frame write a return a pointer to the function of
In the view

CodePudding user response:

Strong with AfxGetMainWnd (), and then turn the pointer

CodePudding user response:

(CMainFrame *) AfxGetMainWnd () - & gt; M_image

CodePudding user response:

Can also through the messaging, data AfxGetMainWnd () - & gt; PostMessage/SendMessage to the main frame window class,
  • Related