I need to have a context menu (currently created with TrackPopupMenu) close automatically after a period of inactivity. I'm trying to search but only finding the opposite (how to activate a popup after a timeout) or specialized things for particular applications. The only things I've found that is even close is to enumerate the children of the desktop until a window with class name #32768 is found -- that will be the menu -- and close it.
I'm hoping for a better, clearer way. Any suggestions?
Send WM_CANCELMODE message to the parent window that host the context menu .
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