Re: Orphaned Popups?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi Greg,
     I'm sorry, i don't get what you mean exactly. To help me and you, could
you post a demo exposing what you mean then i'll see if i can get its
work-around. I don't think that is a bug. There are a few funny things i
experience with the task bar system tray, in that it takes long to respond
when you close you're program. The icon lasts 2-3 seconds before
disappearing. I think the work-around should be a explicit refresh of the
System Tray.

Anyway, send you demo and we fist on it. :)

Jordah.
----- Original Message -----
From: "Greg Haberek" <g.haberek at comcast.net>
To: "EUforum" <EUforum at topica.com>
Sent: Tuesday, March 25, 2003 5:19 AM
Subject: Re: Orphaned Popups?


>
> Thanks Jordah! TrackPopupMenuEx works, but.... The Popup menu doesn't
disappear right away if I
> click off of it. Rather, it seems to 'time out' after 2 or 3 seconds... Is
there any way I can
> speed this up? Or force it to close?
>
> ----- Original Message -----
> From: <jordah at btopenworld.com>
> To: EUforum <EUforum at topica.com>
> Sent: Monday, March 24, 2003 3:35 PM
> Subject: Re: Orphaned Popups?
>
>
> ----- Original Message -----
> From: "Derek Parnell" <ddparnell at bigpond.com>
> To: "EUforum" <EUforum at topica.com>
> Sent: Monday, March 24, 2003 11:52 AM
> 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
>
> Hi Derek,
>      Guillermo Bonvehi's method works. I would suggest to people to get in
> the habit of using
> TrackPopupMenuEx Function. The reason i say this is because of the
TPMPARAMS
> structure which you can fill in and have your popup menu correctly
> displayed(clipped) to the screen.
>
> I HTH.......
>
> --------------------------------------------------------------------------
--
> ----
>
> The TrackPopupMenuEx function displays a shortcut menu at the specified
> location and tracks the selection of items on the shortcut menu. The
> shortcut menu can appear anywhere on the screen.
>
> Syntax
>
> BOOL TrackPopupMenuEx(          HMENU hmenu,
>     UINT fuFlags,
>     int x,
>     int y,
>     HWND hwnd,
>     LPTPMPARAMS lptpm
> );
>
> TPMPARAMS Structure
>
> --------------------------------------------------------------------------
--
> ----
>
> The TPMPARAMS structure contains extended parameters for the
> TrackPopupMenuEx function.
>
> Syntax
>
> typedef struct tagTPMPARAMS {
>   UINT cbSize;
>   RECT rcExclude;
> } TPMPARAMS, *LPTPMPARAMS;
> Members
>
> cbSize
> Size of structure, in bytes.
> rcExclude
> Rectangle to exclude when positioning the window, in screen coordinates.
> Structure Information
>
> Header Declared in Winuser.h, include Windows.h
> Minimum operating systems Windows 95, Windows NT 3.1
>
>
> -----------------
> Jordah
> >
> >
> > TOPICA - Start your own email discussion group. FREE!
> >
> >
> TOPICA - Start your own email discussion group. FREE!
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu