在 WTL 中如何判断子窗口的状态何时发生变化?
我使用 WTL 编写了一个简单的 GUI:
我已经弄清楚了设置涉及到窗口,并且还连接了菜单等来调用我想要的任何内容。但我需要知道,例如,何时有人选中列表视图中的复选框之一,或者何时有人单击按钮。
这些子窗口是否向主窗口发送消息以通知状态更改,并且该通知在子窗口类型之间通常是否一致?
I've written a simple GUI using WTL:
I've got everything figured out as far as setting up the window is concerned, and also wired up the menus and such to call whatever I wish. But I need to know when, for example, someone checks one of the checkboxes in the list view, or when someone clicks on a button.
Do these child windows send a message to the main window notifying of the state change, and is that notification generally consistent between child window types?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
子通知通常以
WM_NOTIFY
或WM_COMMAND
< /a> 消息。某些子通知在大多数控件类型中都很常见(例如
NM_CLICK
和NM_CUSTOMDRAW
),但一般来说,您需要查看 MSDN 上每种控件类型的通知参考看看有什么可用的。首先,列表视图通知的参考为 这里,按钮通知是此处。Child notifications are typically sent to the parent window in the form of
WM_NOTIFY
orWM_COMMAND
messages.Some child notifications are common across most control types (e.g.
NM_CLICK
andNM_CUSTOMDRAW
), but in general you'll need to look at the notifications reference for each control type on MSDN to see what's available. To start, the reference for listview notifications are here and the button notifications are here.