Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - How to stop ComboBox Click event?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to stop ComboBox Click event?

 Post Reply Post Reply
Author
Message
jquerijero View Drop Down
Newbie
Newbie


Joined: 27 March 2020
Location: USA
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote jquerijero Quote  Post ReplyReply Direct Link To This Post Topic: How to stop ComboBox Click event?
    Posted: 29 September 2020 at 2:58pm
When typing ahead, I want to suspend the Click (SelectionChanged) event and only fire it when tabbing out of the control.
Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 761
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Posted: 02 October 2020 at 5:33pm
Did you try a simple subclass approach and trap the CBN_SELCHANGE notification by overriding WindowProc, which is virtual? You can decide to ignore the notification or not.

One approach would be to subclass the windows control GetClassInfo and RegisterClass. Then in your own window proc (or message map if using MFC), you can ignore the sel changed message using a method to turn it off and on.

Once registered you can drop it on a dialog using the custom control in the toolbox or you can use SubClassDlgItem and to swap out the control using code when the dialog is created.

Either way, you have to be careful about what to do if the CBN_DROPDOWN message arrives as users can arrow down and enter or just move down and click an item.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.031 seconds.