Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

General question about VC++

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have an Single Document project derived from CFormView...and I also created a regular dialog...i was wondering how I can get data from the regular dialog into the document view form....
 
You could pass a pointer from either:

1) the FormView window, or
2) a class or structure containing your data members,

to your dialog box when you create it:

1) CDialog MyDialog(CWnd* pMyFormViewWnd);
2) CDialog MyDialog(CMyClass* pMyClass);

Then, within your dialog, you can use the pointer to access either the FormView's methods or your structure:

1) pMyFormViewWnd->SetCustomerName(sName);
2) pMyClass->SetCustomerName(sName);

Alternately, you can POST messages to the FormView window itself.

pMyFormViewWnd->PostMessage(WMU_USER_SELECTION);

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top