VC 中热键的奇怪行为++

发布于 2024-07-21 07:27:50 字数 206 浏览 2 评论 0原文

我有一个用 VC++ 编写的对话框,如下所示:


Label1 Control1


Button1


如果 Control1 被禁用,则使用 Label1 的热键会导致 Button1 的 Click 事件。 我怎样才能避免这种情况呢? 由于 Control1 被禁用,Label1 的热键不应该也被禁用吗?

I have a dialog written in VC++ as shown below:


Label1 Control1


Button1


If Control1 is disabled, using Label1's hotkey results in Button1's Click event. How could I avoid that? As Control1 is disabled shouldn't the hotkey for Label1 too?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

∞梦里开花 2024-07-28 07:27:50

如果它是 CStatic,您是否尝试过在它引用的控件的同时禁用它?

If it's a CStatic, have you tried disabling it at the same time as the control it's referencing?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文