Click here to Skip to main content
12,402,189 members (69,627 online)
Rate this:
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 21:06pm
CPallini 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
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[^].

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

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