문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top