Hi
I missed most of this thread, but from what I gather you are talking about
the workings an application that creates an icon in the system tray. A
while back, I created a Windows Tray application that, on windows, allows
you to change the default printer from the system tray. I wrote the app
with Visual C++ (ver5). The app works great using the Corel wine version.
It creates the tray icon, actually finds the lp printer and displays a menu
with the printers listed. Selecting one of the lps causes a massive crash,
but I expected as much.
If you are interested, I will send the source code.
Regards
Tim Legge
Moncton, NB
-----Original Message-----
From: gerard patel [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 16, 2000 5:44 PM
To: Susan Farley
Cc: [EMAIL PROTECTED]
Subject: Re: top-level wnds on system tray under managed mode
At 11:02 AM 5/16/00 -0400, you wrote:
<snip>
>Now the owner of the managed windows shows up on the system
>tray as well. This is a tiny (1x1) window that is hardly
>visible.
Is it really a 1x1 window ? This would be ugly under Windows; it
would appear as a point on the desktop. As a wild guess, I think that
the app creates a 0x0 window and it's changed to a 1x1 window in
WIN_CreateWindowEx :
if(cs->style & WS_CHILD)
{
if(cs->cx < 0) cs->cx = 0;
if(cs->cy < 0) cs->cy = 0;
}
else
{
if (cs->cx <= 0) cs->cx = 1;
if (cs->cy <= 0) cs->cy = 1;
}
This does not happen under Windows; a window created with
0 width and height stays at these values and is not shown at all
whatever it's style (WS_VISIBLE or not) - the window rect is 0x0.
My understanding is that with X it's not possible to create a window
with null dimensions, hence the code to force a 1x1 window in this
case (there is a similar hack in X11DRV_WND_SetParent)
An interesting approach could be to not show the window in this
case (0 width or 0 height), but it would be difficult - it would
be necessary to create or delete the X counterpart when the dimensions
of a 'native' window are changed
Gerard