|
I used VC to build a single document application with a split bar, and used the wizard to create a dialog class CFindDlg, and set an edit box on the dialog box to enter a string, and the corresponding member variable of the edit box is CString M_find of the class,
A button is set on the toolbar, and the message processing is set in the CMyView class, which is used to click the pop-up dialog box
void CMyView :: OnButton32771 () // Message processing function
{
CFindDlg m_FindDlg;
m_FindDlg.DoModal // DoModal is used to create a modal dialog box
m_FindDlg.m_find; // m_find cannot return the edit box data in the dialog box
}
If the message processing function is set in the main frame CMainFrame class, or in the single document program CMyView class without splitter, there is no problem. My problem is that if the message processing function is set in the CMyView class of my program, m_find cannot I received the data in the edit box.Why? If you want to study, you can provide a program. |
|