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())

devx-admin

Share the Post: