Re: Orphaned Popups?
- Posted by Greg Haberek <g.haberek at comcast.net> Mar 24, 2003
- 357 views
I couldn't find anything on GetMenuRect in the API, where is it? I found GetMenuItemRect, could I use that and add up the MenuItem sizes? ----- Original Message ----- From: Derek Parnell <ddparnell at bigpond.com> Subject: Re: Orphaned Popups? ----- Original Message ----- From: <pampeano at rocketmail.com> To: "EUforum" <EUforum at topica.com> Sent: Monday, March 24, 2003 10:33 PM 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 TOPICA - Start your own email discussion group. FREE!