[弱问一个] 关于 ComboBox,该如何处理
[弱问一个] 关于 ComboBox
请问如何 获取选中 ComboBox 编辑框的消息,
ON_CBN_SETFOCUS 在点中 编辑框 或者 下拉框的时候都会响应,
但是我需要分别响应,请教一下如何进行处理?
------解决方案--------------------
“在点中编辑框或者下拉框的时候都会响应”
只有能输入的控件才有focus编辑框可以输入所以有focus,下拉框时编辑框先得到focus,所以试试CBN_DROPDOWN
------解决方案--------------------
CBN_SETFOCUS : Indicates the combo box is receiving the input focus.
CBN_DROPDOWN : Indicates the list box of a combo box is dropping down.
------解决方案--------------------
在setfocus中试试.使用BOOL GetDroppedState( ) const;可以查到
请问如何 获取选中 ComboBox 编辑框的消息,
ON_CBN_SETFOCUS 在点中 编辑框 或者 下拉框的时候都会响应,
但是我需要分别响应,请教一下如何进行处理?
------解决方案--------------------
“在点中编辑框或者下拉框的时候都会响应”
只有能输入的控件才有focus编辑框可以输入所以有focus,下拉框时编辑框先得到focus,所以试试CBN_DROPDOWN
------解决方案--------------------
CBN_SETFOCUS : Indicates the combo box is receiving the input focus.
CBN_DROPDOWN : Indicates the list box of a combo box is dropping down.
------解决方案--------------------
在setfocus中试试.使用BOOL GetDroppedState( ) const;可以查到