Combo Box List: no response to R mouse button
- Posted by Al Getz <xaxo at AOL.COM> Nov 07, 2000
- 425 views
Dan, Looking at the code you sent me, i have determined the reason right click on the list portion of the combo box doesnt work is because after the list is opened, windows takes control of the mouse and doesnt send any messages to any windows (doesnt appear to trap the R button at all). Because of this: subclassing wont help installing a mouse hook wont help In addition, ChildWindowFromPoint() didnt return the window either (to try to subclass the list window). Since none of the above appears to work, i would (at least for now) recommend finding an alternative method to achieve the same results such as: (ordered from easiest to most difficult to implement) 1. create a button so that after the list is closed, the event for that button can provide the functionality you are looking for. 2. emulate the combo by: creating your own list by trapping CBN_DROPDOWN (as an event) and have it open a standard list box which you can then use LB_ constants as we did before to identify the selected item. CBN_CLOSEUP would then trigger the closing of the list box. This method would have the added benefit of providing all the functionality of a standard list box as well. 3. emulate the combo fully, drawing all aspects of the box yourself. I might look at this more, but i have other things in the workings too. I hope to get some form of a windows based debugger going soon too. Let me know if you find any other solutions or ideas also, ok? --Al