devxlogo

SysTray Popup Menu

SysTray Popup Menu

Question:
I’ve used your technique for getting the icon in the tray and for being notified when the user has clicked on it, but I’m having a problem getting a pop-up menu to show near the icon. Since the pop-up menu uses the current window, the menu is not visible. I’ve tried GetCursorPos(lppoint) and translated to PBU’s. That didn’t work, either.I want the menu to pop up at the current cursorlocation without regard for any window.

Answer:
The best way is to use a response window and set the visible attribute to FALSE, then in the systray event add code like the following:

my_menu.m_tray.PopMenu(PointerX(), PointerY())
See also  How to Block Websites During Certain Hours on a Mac Computer
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist