Although I've figured out how to block the up and down arrow keys by processing, in the message actions of a combo box, the WM_GETDLGCODE message and returning 0, that doesn't do anything for those other keys.
Thanks for the suggestion, however that does not work.
Users of our application find it much too easy to unintentionally alter values in combo boxes (when they have the focus) with:
- Mouse Scroll Wheel
- Any key on the keyboard
*Edit* You'll find in the sample commented code that either did not work at all, or only partially helped. *Edit Done*
As an alternative to all of this, I could take the combo boxes out of the tab order, which would force users to mouse-click on a combo box, but I keep that as a last resort.
the reason why my sample works is that my combo box is editable. If the combobox is not editable, the focus is on the arrow to open the combo box and not on the datafield. If you set the combo box to editable you can prevent the keysstroke in the the VTM_KeyDown section.
If NOT VisListGetDropdownState( hWndItem )
If wParam = VK_PageDown OR wParam = VK_PageUp
If wParam = VK_Home OR VK_End
EDIT: Ugh, I missed that bit about disabling the keystrokes. Excellent stuff, Ewald. THANKS !!!
Although that makes sense, I can't set that sort of thing up because none of our combo boxes are editable.
Much appreciated, and Happy Tuesday ! (I'm just a hop skip and a jump away from Happy Wednesday Eve...)
Who is online
Users browsing this forum: Ccbot [Crawler] and 0 guests