|
-
January 17th, 2016, 07:25 AM
#12
Re: pass variable value from one dialogbox to other/ one class to other class in vc++
 Originally Posted by GCDEF
There's nothing magic about dialog boxes. You pass variables around the same way you do with any other objects. You can write set and get methods or if it's public, just set the member directly.
CMyDialog dlg;
dlg.m_intVariable = 7;
What's the confusion?
in CMyDialog1 class file:
m_intVariable =7;
and in CMyDialog2 class file:
int value;
CMyDialog1 dlg;
value= dlg.m_intVariable ;
if we do not call DoModal method before assignment then dlg.m_intVariable is empty.
Last edited by [email protected]; January 17th, 2016 at 07:32 AM.
Tags for this Thread
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
|