Click here to Skip to main content
15,667,885 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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?
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

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[^].
Share this answer

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