"Carlo" <carlodevREMOVE@gmail.com> schrieb:
> I've not found an event that notify me when drop-down part of a BomboBox
> is closed. OnDropDown just notify when the drop-down is displayed, not
> when it is closed.
>
> Is there a message in WndProc that can be used to intercept a drop-down
> closing?
Listen for 'WM_COMMAND' of the parent window and check if 'wParam''s
high-order word is 'CBN_CLOSEUP'.

Signature
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Carlo - 16 Nov 2005 11:57 GMT
Hello Herfried,
thank you for your help.
The problem is that I don't have a parent window available (do you means
parent form?) because I'm working on a control that inherits from
System.Windows.Forms.ComboBox.
I checked all messages raised by WndProc of my ComboBox, but I've seen any
WM_COMMAND.
Carlo
-------------------------------------------
Carlo, MCP (Windows Based Applications)
carlodevREMOVE@gmail.com
> "Carlo" <carlodevREMOVE@gmail.com> schrieb:
>> I've not found an event that notify me when drop-down part of a BomboBox
[quoted text clipped - 6 lines]
> Listen for 'WM_COMMAND' of the parent window and check if 'wParam''s
> high-order word is 'CBN_CLOSEUP'.
Claes Bergefall - 17 Nov 2005 08:53 GMT
> "Carlo" <carlodevREMOVE@gmail.com> schrieb:
> > I've not found an event that notify me when drop-down part of a BomboBox
[quoted text clipped - 6 lines]
> Listen for 'WM_COMMAND' of the parent window and check if 'wParam''s
> high-order word is 'CBN_CLOSEUP'.
No need to use the parent window. All WM_COMMAND and WM_NOTIFY
messages are reflected to the control itself. Use this:
http://groups.google.se/group/microsoft.public.dotnet.framework.windowsforms/msg
/579c8133581d8d1f?hl=sv
/claes
Claes Bergefall - 17 Nov 2005 09:50 GMT
> > "Carlo" <carlodevREMOVE@gmail.com> schrieb:
> > > I've not found an event that notify me when drop-down part of a BomboBox
[quoted text clipped - 9 lines]
> No need to use the parent window. All WM_COMMAND and WM_NOTIFY
> messages are reflected to the control itself. Use this:
http://groups.google.se/group/microsoft.public.dotnet.framework.windowsforms/msg
/579c8133581d8d1f?hl=sv
> /claes
Just an addition. The above solution requires that you inherit the combobox
If you, for some reason, don't want to inherit it, use Herfried's suggestion
(the parent being the Form/Panel/whatever that the combobox is placed on)
/claes
Carlo - 17 Nov 2005 09:50 GMT
This is exactly what I was searching for!
Thank you to Herfried and thank you to Claes.
Carlo
-------------------------------------------
Carlo, MCP (Windows Based Applications)
carlodevREMOVE@gmail.com
>> "Carlo" <carlodevREMOVE@gmail.com> schrieb:
>> > I've not found an event that notify me when drop-down part of a
[quoted text clipped - 14 lines]
>
> /claes