Home > Software engineering >  CPropertySheet custom string why OnRectData not receive messages sent message processing have no rea
CPropertySheet custom string why OnRectData not receive messages sent message processing have no rea

Time:09-30


 Resource. H# define WM_RECVDATA WM_APP + 8888 

Sender:
Cstrings * MSG=L "EEEEEE";
CAttributePropertySheet * dlgPropertySheet=new CAttributePropertySheet (MSG);
If (dlgPropertySheet - & gt; DoModal ()=={IDOK)
CPropertyPage * activePage=dlgPropertySheet - & gt; GetActivePage ();
The CWnd * pRadarWnd=activePage - & gt; GetParent ();
If (pRadarWnd - & gt; GetSafeHwnd ()==NULL)
{
MessageBox (L "Unable to find radar window");

} else {
: : SendMessage (pRadarWnd - & gt; WM_RECVDATA GetSafeHwnd (), NULL, (LPARAM) & amp; MSG);

}
}

The receiver
CImagesAttributePropertyPate. H file code
Afx_msg LRESULT OnRecvData (WPARAM WPARAM, LPARAM LPARAM);


CImagesAttributePropertyPate. CPP file code

BEGIN_MESSAGE_MAP (CImagesAttributePropertyPate CPropertyPage)
ON_MESSAGE (WM_RECVDATA, & amp; CImagesAttributePropertyPate: : OnRectData)
END_MESSAGE_MAP ()

LRESULT CImagesAttributePropertyPate: : OnRectData (WPARAM WPARAM, LPARAM LPARAM)
{
//TODO: add the message handler code and/or invoke the default
LParam cstrings * RMSG=(cstrings *);
RMSG AfxMessageBox (*);

return 0;
//return CPropertySheet: : OnCopyData (pWnd, pCopyDataStruct);
}
  • Related