I am developing a plugin for an application, and I must register any controls I create with my host application, else they do not receive any messages and are effectively disabled. Registration is performed using a control’s window handle. (Please treat this part as a given, it is only a background as to why I need this.)
In order to do this, for every winforms control I create, I use its HandleCreated event and HandleDestroyed event to recursively register/unregister the control’s handle and any child controls it owns.
I can do the same thing with a ContextMenuStrip, and this is fine for the first level of items, but if any of those items have submenus, I do not know how I can get a handle to the sub-menu that has opened in order to register it.
The ToolStripMenuItem objects inherit from System.ComponentModel.Component and not from System.Windows.Forms.Control, so they do not have a .Handle property, nor HandleCreated and HandleDestroyed events.
See image for exactly which window I need the handle of (at time of creation).

Use
ToolStripMenuItem.DropDown.Handle.