Click here to Skip to main content
15,883,919 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
My first project was working fine until I tried making it more visually appealing.

On initilization, my main dialog creates an output dialog with three sections of read-only fields. The main dialog has 3 buttons, each producing a dialog corresponding to a section of the output dialog. It is from these user entry dialogs where the user is allowed to update data/common. Upon exiting I'm doing an Invalidate( TRUE ) on the output dialog in the OnPaint section of maindlg to force an update of its fields. Everything is fine to this point.

Now I set the x/y coordinates on the 3 user entry dialogs to pop up just beneath the corresponding output section, rather than on top of maindlg. Now, I see, the maindlg has no need to "paint" when I exit.

So, how can I force an update of my outdlg from each of my user entry dialogs, all being childs of maindlg.
Posted

1 solution

The typical approach used is to PostMessage a user-defined message from dialog-1 to dialog-2. Dialog-2 handles this user-defined messages and invalidates itself.
 
Share this answer
 
Comments
Albert Holguin 22-Apr-11 20:00pm    
...or SendMessage()... my 5
Nish Nishant 23-Apr-11 9:17am    
Thank you.
sbwilliams59 3-Jun-11 10:29am    
Hey Albert...I have another post on this subject if you wouldn't mind takig a look. A link to HOW to Post or Send messages would be greatly appreciated.

Thanks,

Scott

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