I've got an MDI win32 application in Delphi. It has many forms, all of them and their inner components have own popup menus.
After some time when application idles trigger starts and it closes all child windows. But it doesn't close popup menu if it is showing. (For example user clickes right button and leaved computer -the popup menu should be closed also when trigger starts.)
GetWindow function doesn't find the popup menu.
How to find the popup menu and close it?
SendMessage(PopupList.Window, WM_CANCELMODE, 0, 0);
The global Menus.PopupList
object manages the window that handles all messages for VCL popup menus in the application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With