How to create system tray dialog box? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How to create system tray dialog box?

I made program to talk over LAN, it works fine but I want it to work in the system tray, the main window is dialog box. I'm using LCC 32

thanks


Comments

  • I've never used LCC 32, but the API to use is Shell_NotifyIcon, the MSDN help on the function is 5 lines or so :) But there's a VB sample you can look at, its straight forward.



    If I were you I'd create my dialog as usual but make it invisible, when the user double clicks the icon, I show the dialog, when minimized hide it again and finally when closed I'd remove the icon and terminate.



    A pop up menu when right clicking the icon is also a standard thing, just dont forget to call SetForegroundWindow(hDialog) before you call TrackPopupMenu.



    : I made program to talk over LAN, it works fine but I want it to work in the system tray, the main window is dialog box. I'm using LCC 32

    : thanks

    :






Sign In or Register to comment.