![]() |
How to stop ComboBox Click event? |
Post Reply ![]() |
Author | |
jquerijero ![]() Newbie ![]() Joined: 27 March 2020 Location: USA Status: Offline Points: 8 |
![]() ![]() ![]() ![]() ![]() 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.
|
|
![]() |
|
rdhd ![]() Senior Member ![]() ![]() Joined: 13 August 2007 Location: United States Status: Offline Points: 871 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |