Pregunta

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?

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top