Click here to Skip to main content
11,704,315 members (44,172 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C++
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 22-Apr-11 5:40am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
Albert Holguin at 22-Apr-11 20:00pm
...or SendMessage()... my 5
Nishant Sivakumar at 23-Apr-11 9:17am
Thank you.
sbwilliams59 at 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.



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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 740
1 OriginalGriff 520
2 Maciej Los 355
3 Andy Lanng 284
4 CPallini 275
0 OriginalGriff 8,824
1 Sergey Alexandrovich Kryukov 8,247
2 CPallini 5,197
3 Maciej Los 4,726
4 Mika Wendelius 3,606

Advertise | Privacy | Mobile
Web02 | 2.8.150819.1 | Last Updated 22 Apr 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100