开发者

CCombobox painting issue

开发者 https://www.devze.com 2023-02-25 13:12 出处:网络
In a开发者_运维技巧n owner draw ccombobobox, the text in the combo edit remains selected even the focus is on some other control. I have subclassed the combo edit and list box.

In a开发者_运维技巧n owner draw ccombobobox, the text in the combo edit remains selected even the focus is on some other control. I have subclassed the combo edit and list box.

Can anyone suggest what probably can be the reason for this.. any hint is much appreciated


Are you handling the CBN_KILLFOCUS message? One possible solution is to handle this message and clear the selection in the handler - use SetCurSel(-1).

It's worth taking a look at http://msdn.microsoft.com/en-us/library/bb775793%28v=vs.85%29.aspx to get a proper idea of the order that the notification messages are sent.

0

精彩评论

暂无评论...
验证码 换一张
取 消