Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: MFC
I have an application which has many dialogs. I have positioned dialogs on main / parent dialog initially. Whenever there is a change in screen resolution I have capture the co-ordinates in WM_SETTINGCHANGE handler. While changing the screen resolution this handler calculates the current co-ordinates but to show the dialog in proper place I need to close he dialog and reopen it again where in OnInitdialog it gets the new co-ordinates and re-position the window. But I want that dialog shd be re-positioned whenever there is a change in screen resolution. I tried to capture WM_SETTINGCHANGE in chiled dialog but this handler doesn't get called when screen resolution changes.
Pls let me know how to send message to child dialog to re-position whenever there is a change in screen resolution?
Posted 28-Apr-13 22:06pm
SNI1.5K
Comments
CPallini at 29-Apr-13 3:33am
   
Probably I didn't get you, however: If you correctly get the WM_SETTINGCHANGE in your main window then, there, you can call a method on all your dialog children to make them change position, can't you?

1 solution

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

Solution 1

From within the WM_SETTINGCHANGE handler of your main window you can send this message (or a user defined one) to all descendant windows using SendMessageToDescendants[^].
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 277
1 Maciej Los 210
2 BillWoodruff 205
3 Jochen Arndt 180
4 Sergey Alexandrovich Kryukov 165
0 OriginalGriff 5,130
1 DamithSL 4,157
2 Maciej Los 3,650
3 Kornfeld Eliyahu Peter 3,460
4 Sergey Alexandrovich Kryukov 2,811


Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 29 Apr 2013
Copyright © CodeProject, 1999-2014
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