1. Combo Box List: no response to R mouse button
- Posted by Al Getz <xaxo at AOL.COM> Nov 07, 2000
- 426 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
2. Re: Combo Box List: no response to R mouse button
- Posted by Dan B Moyer <DANMOYER at PRODIGY.NET> Nov 07, 2000
- 450 views
Al, Thanks a lot for looking into this problem for me; I think at this time I like your 2nd workaround best, emulating the list portion of the combo box so I can right click on it with your original method. I couldn't see *why* it wasn't working, but it definitely seemed that there was simply *no* response to right click in the list portion of the combo at all, looks like you figured out the why. Hope someone can figure out how to get R click on combo list to work sometime. :) Thanks again! Dan ----- Original Message ----- From: "Al Getz" <xaxo at AOL.COM> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Tuesday, November 07, 2000 8:46 AM Subject: Combo Box List: no response to R mouse button > 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
3. Re: Combo Box List: no response to R mouse button
- Posted by David Cuny <dcuny at LANSET.COM> Nov 07, 2000
- 438 views
- Last edited Nov 08, 2000
Dan Moyer wrote: > emulating the list portion of the > combo box so I can right click on > it with your original method. You can also have a look at my emulated property list, which uses a list to emulate a combo box: http://www.lanset.com/dcuny/download/ide.zip -- David Cuny