Windows Develop Bookmark and Share   
 index > Windows Forms General > Cannot catch WM_CONTEXTMENU or WM_RBUTTONDOWN in ComboBox WndProc
 

Cannot catch WM_CONTEXTMENU or WM_RBUTTONDOWN in ComboBox WndProc

Good day!

I'm trying to handle the WM_CONTEXTMENU or WM_RBUTTONDOWN in my class that derives from ComboBox, but the problem is that I need to do the mouse click on the dropdown button for the event to be raised. If I click on the editable portion of the combobox, nothing happens. I hope you can enlighten me on this one. =) Thanks!

dyowee  Tuesday, June 26, 2007 3:07 PM

The Edit control is a child of the ComboBox.

You can intercept it's messages by assinging it's handle to a NativeWindow.

You will find an example of this on my site:

OwnerDraw ContextMenus do not ownerdraw when assigned to a ComboBox

Mick Doherty  Tuesday, June 26, 2007 3:40 PM

The Edit control is a child of the ComboBox.

You can intercept it's messages by assinging it's handle to a NativeWindow.

You will find an example of this on my site:

OwnerDraw ContextMenus do not ownerdraw when assigned to a ComboBox

Mick Doherty  Tuesday, June 26, 2007 3:40 PM

You can use google to search for other answers

Custom Search

More Threads

• ToolstripControlHost and item reordering inside a Toolstrip
• Create a Bitmap out of Printer Graphics Object?
• crystal reports direct print using printdialog
• setting the focus to the tabpages in c# using ado.net
• Dictionary for using Date Comparison values
• C# please help
• textbox maximum input
• Thumb nailing a WebBrowser control that’s hidden
• visual effects help
• manual datanavigator position textbox change