AlwaysLearningNewStuff
AlwaysLearningNewStuff

Reputation: 3031

Detect changes in user locale setting (Control Panel -> Clock,Language and Region) in child dialog box

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?

Upvotes: 1

Views: 164

Answers (1)

Jonathan Potter
Jonathan Potter

Reputation: 37152

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).

Upvotes: 1

Related Questions