Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have two dialogs which is Dialog1 and Dialog2.
In Dialog1, I entered some value in Edit Box, so I need that entered updated value in Dialog2 Edit Box.
Please help me.
Posted
Updated 29-Aug-11 19:34pm
v2

You might try posting a message from Dialog1 to Dialog2 and have Dialog2 respond by changing its edit box. If you keep the communication one way and use PostMessage[^] it should work.

Code Project has a nice article on message management[^].
 
Share this answer
 
Comments
Albert Holguin 11-Dec-11 0:38am    
PostMessage() for asynchronous data, SendMessage() for synchronous calls... best options for doing this... +5
You can access other variables of dialog boxes you have crreated by doing the following:

CMyDialog dlg;

if(dlg.DoModal() == IDOK)
{
myVariable = dlg.otherDialogVariable;
Do something...
}

Hope this helps!
DrB
 
Share this answer
 
Comments
Albert Holguin 11-Dec-11 0:39am    
This is not really the best way to do it... although it would work. +4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900