Re: Orphaned Popups?
- Posted by Derek Parnell <ddparnell at bigpond.com> Mar 24, 2003
- 366 views
----- Original Message ----- From: <pampeano at rocketmail.com> To: "EUforum" <EUforum at topica.com> Subject: Re: Orphaned Popups? > > Hi Greg, > Try this modified systray_event routine, i'm sure it'll work. > > procedure SysTray_onEvent(integer id, atom msg) > sequence pos > > if msg = LeftDown then > -- Changes start here > pos = getPointerPos() > pos = ClientToScreen(Main,pos[1],pos[2]) > -- Changes end here > popup( MyPopup, pos[1], pos[2] ) > repaintWindow( Main ) > wPuts( Main, sprintf("Clicked (%d, %d)", pos) ) > end if > > end procedure > > Best Regards, > Guillermo Bonvehi > AKA: KNiXEUR - Caballero Rojo Not really. The getPointerPos() already returns the pointer position relative to the screen. I suggest that he needs to call the GetMenuRect API call to find the dimensions of the popup menu, then calculate the top-left corner screen position of the menu based on that. ---------------- cheers, Derek Parnell