Announcement

Collapse
No announcement yet.

System Tray question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Scott Turchin
    replied
    I wouldn't mind taking a look at the code, I can see everyone's point and it may be easier to just leave it alone, BUT m y Timeserver app could use tha code...


    Thanks,

    Scott


    ------------------
    Scott
    mailto:[email protected][email protected]</A>
    MCSE, MCP+Internet

    Leave a comment:


  • DorianDarby
    Guest replied
    Hi Scott,
    I use DDT for most apps. If I want to show a tray icon without
    a task bar icon, I create a custom message (e.g. %WM_MAKEMEHIDE)
    which I call in the %WM_INITDIALOG message. This custom message
    hides the main window, which stops it from showing the icon on
    the task bar.

    The secret is to POST the message to the dialog handler, and not
    SEND it, or else nothing happens (from what I remember).

    Before I post the message, I create the tray icon and anything else.

    I also set the DDT's form size to 0 high and 0 wide, so that it
    doesn't show up briefly on screen. The only drawback is the
    current app loses focus very briefly, until your window has been
    hidden.


    If you want a code sample, email me and I'll send over a demo...

    [email protected]


    ------------------

    Leave a comment:


  • Eric Pearson
    replied
    If I recall correctly, you can create the app's main window with the WS_ES_TOOLWINDOW extended style, and it will not have a Task Bar button. It makes the app's title bar look somewhat different, however.

    Most Sys Tray apps (such as the NT Task Manager, the Volume Control, etc.) do show a Task Bar button when they are active. They only disappear from the Task Bar when they are minimized to the Sys Tray. The Clock, however, does not, and its title bar looks normal. I used SPY++ to find out how it does that... Apparently it creates a hidden window with the WS_EX_TOOLWINDOW style, then creates a visible, normal dialog as a child of the hidden window.

    -- Eric


    ------------------
    Perfect Sync: Perfect Sync Development Tools
    Email: mailto:[email protected][email protected]</A>



    [This message has been edited by Eric Pearson (edited July 06, 2000).]

    Leave a comment:


  • Scott Turchin
    started a topic System Tray question

    System Tray question

    I've got an app that runs in the system tray, but I do NOT want it on the task bar to the left...

    I recall seeing how to do this, but without hiding the window I forget


    Scott

    ------------------
    Scott
    mailto:[email protected][email protected]</A>
    MCSE, MCP+Internet
Working...
X