Because you want to use the modeless dialog box to do the tool panel, you need the child box to call the parent box member variables and member functions.
Previously used to send a message scheme, the same time trial parent pointer method was not successfully implemented,
This time, the successful implementation of the two pointer scheme, as follows:
Scenario One: The parent box creates a child box and passes the pointer.
P_dlg_filter = new Cdlg_filter;
P_dlg_filter->create (Idd_dialog_midfilter,null);
P_dlg_filter->showwindow (Sw_show);
P_dlg_filter->m_pmain = (void *) this;
First, a *m_pmain public variable of life in a child box class that points to itself when the parent box creates a child box;
Cvmat2d.copyto ((CDISHDECTDLG *) m_pmain)->CVMAT2);
(CDISHDECTDLG *) m_pmain)->displaymat1 ();
The pointer is then used in the child box to manipulate the members in the parent box (member variable CVMAT2, member function DISPLAYMAT1, and so on).
Scenario Two: Create a pointer inheritance directly in a child box (. ) Parent box.
Cdishdectdlg *pfilter1 = (Cdishdectdlg *) getparent ();
Pfilter1->cvmat1d.copyto (CVMAT2D);
PFILTER1->DISPLAYMAT1 ();
Declare the parent box pointer to inherit the parent box directly, call its member variables and function functions.
PS: In the article:
Cdishdectdlg---Parent box class name
P_dlg_filter---the Child box class pointer variable in the parent box
PPS: The above methods for reference from the network, if the infringement of the copyright, only for Laughs