|
-
May 23rd, 2002, 11:50 AM
#1
Moving data between parent and child windows
Problem in Dialog Based app
------------------------------------
The dialog based app has a main wiondow and the child window needs a variable from the parent window. I notice that though I instantiate an object of the parent window and access the variable . the resulting variable is "empty".
// CmainDialog.cpp class derived from CDialog
void CMainDialog::setVar()
{
char* m_var = "Number of People";
}
//CNext.cpp class derived from CDialog
void CNext::OnOK()
{
UpDateData(TRUE);
CMainDialog dlg;
CString myvar;
myvar = (CString)dlg.getVar(); // This variable is empty.
}
Can somebody please help me out here ??
I rate ALL posts .
Thanks ,
Kamath.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|