1

I have dialog box made in resource editor that behaves as a child control of the main window.

In normal mode, when behaving as a popup, dialog can receive WM_SETTINGCHANGE message that notifies dialog box about user changing locale settings, but as a child it does not seem to receive this message -> after setting up a breakpoint at relevant code, the debugger never reaches those lines.

Is there a way to detect in child dialog box when user changes locale in Control Panel?

AlwaysLearningNewStuff
  • 2,939
  • 3
  • 31
  • 84
  • What are you trying to do with the locale changes? – andlabs Feb 03 '15 at 02:17
  • 2
    `WM_SETTINGCHANGE` is sent to top-level windows only. So if your child window needs to know about it, have your top-level window forward it on. – Jonathan Potter Feb 03 '15 at 03:32
  • @andlabs: *What are you trying to do with the locale changes?* I am implementing locale aware decimal edit control ( xxxxx@yyyy, where xxxxx and yyyy are numbers and @ is decimal separator ). I need proper decimal number in the edit control because I enter its value into database. If not formatted per user locale, the decimal part gets cut off. See the 3rd answer to [this](http://www.codeproject.com/Questions/728310/Locale-aware-edit-control-subclassing-for-decimal?arn=0) question for specific details. – AlwaysLearningNewStuff Feb 03 '15 at 14:07
  • @JonathanPotter: All is well now. If you post your comment as an answer I will officially accept and upvote it. You have deserved it! Best regards! – AlwaysLearningNewStuff Feb 09 '15 at 15:52

1 Answers1

1

WM_SETTINGCHANGE is sent to top-level windows only. So if your child window needs to know about it, have your top-level window forward it on (i.e. with SendMessage(hwndChild, uMsg, wParam, lParam); or similar).

Jonathan Potter
  • 36,172
  • 4
  • 64
  • 79