检测子对话框中用户区域设置(控制面板 - >时钟,语言和区域)的更改 [英] Detect changes in user locale setting (Control Panel -> Clock,Language and Region) in child dialog box

查看:169
本文介绍了检测子对话框中用户区域设置(控制面板 - >时钟,语言和区域)的更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在资源编辑器中创建了一个对话框,其作为主窗口的子控件。



在正常模式下,当表现为弹出窗口时,对话框可以收到 WM_SETTINGCHANGE [ ^ ]消息通知对话框有关用户更改区域设置的信息,但作为孩子,它似乎没有收到此消息 - >在相关代码上设置断点后,调试器永远不会到达那些行。



当用户在控制面板中更改区域设置时,有没有办法在子对话框中检测?

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?

推荐答案

您必须在应用中转发消息。将相同参数发布到实际窗口并在消息处理程序中处理。
You must forward the message in your app. Post it with the same parameters to your actual window and handle it in a message handler.


这篇关于检测子对话框中用户区域设置(控制面板 - >时钟,语言和区域)的更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆