CodePudding user response:
To control a pointer is passed to the class in theSuch as
ClassB
{
Public:
CEdit * m_pEdit;
ClassB () {m_pEdit=NULL; }
Public:
Void Fun ()
{
If (m_pEdit & amp; & M_pEdit - & gt; M_hWnd)
{
M_pEdit - & gt; SetWindowText (_T (" Test "));
}
}
};
ClassA
{
Void FunA ()
{
ClssB b (this);
B.m _pEdit=& amp; M_Edit;
B.D oModal ();
}
};
CodePudding user response:
It can be used, but the control will not receive the messageCodePudding user response:
Send a message to the main dialog, PostMessage, let the main dialog box operation