CB_GETLBTEXT 通知程序
我正在尝试修改特定组合框的选择。 我已经成功检索到句柄了。 但是,当我调用如下函数时,我无法正确修改组合框选择:
r = SendMessage(cbox, CBN_SELCHANGE, 2, 0);
完成我想做的事情的最简单方法是什么? 提前致谢。
I'm trying to modify the selection of a particular combobox. I have already retrieved the handle successfully. However, when I call the function as below, I cannot modify the combobox selection properly:
r = SendMessage(cbox, CBN_SELCHANGE, 2, 0);
What would be the easiest method to accomplish what I want to do? Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
CBN_SELCHANGE 只是一个通知,当用户选择更改时,它会通过 WM_COMMAND 消息发送到父窗口。
CB_SETCURSEL 是您需要使用的消息。
应该管用。
CBN_SELCHANGE is just a notification, it is sent via a WM_COMMAND message to the parent window when selection changes by the user.
CB_SETCURSEL is the message you need to use.
Should work.