Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. About SystemTray

About SystemTray

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    parims
    wrote on last edited by
    #1

    How to add an Icon to the SystemTray. When I run my application ,Application is executing (dialog based appli) as well as icon is adding to system tray. But my requirement is when I run appli., It initially added to Taskbar(tray).,When I right click on icon a menu will display . After I clicking a menu item (Start) application will Starts.(i.e,ShowWindow(SW_NORMAL)) ---- >I added code(code to adding to tray) in OnInitDialog. But It is displaying as previous . >Initially I dont want to show window. Plz Send a simple code to add an icon initially to system tray. Praveen Chowdam Kumar

    T Mircea PuiuM 2 Replies Last reply
    0
    • P parims

      How to add an Icon to the SystemTray. When I run my application ,Application is executing (dialog based appli) as well as icon is adding to system tray. But my requirement is when I run appli., It initially added to Taskbar(tray).,When I right click on icon a menu will display . After I clicking a menu item (Start) application will Starts.(i.e,ShowWindow(SW_NORMAL)) ---- >I added code(code to adding to tray) in OnInitDialog. But It is displaying as previous . >Initially I dont want to show window. Plz Send a simple code to add an icon initially to system tray. Praveen Chowdam Kumar

      T Offline
      T Offline
      ThatsAlok
      wrote on last edited by
      #2

      parims wrote: Initially I dont want to show window. this article will help :) http://www.voidnish.com/articles/ShowArticle.aspx?code=dlgboxtricks[^]

      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

      cheers, Alok Gupta VC Forum Q&A :- I/ IV

      1 Reply Last reply
      0
      • P parims

        How to add an Icon to the SystemTray. When I run my application ,Application is executing (dialog based appli) as well as icon is adding to system tray. But my requirement is when I run appli., It initially added to Taskbar(tray).,When I right click on icon a menu will display . After I clicking a menu item (Start) application will Starts.(i.e,ShowWindow(SW_NORMAL)) ---- >I added code(code to adding to tray) in OnInitDialog. But It is displaying as previous . >Initially I dont want to show window. Plz Send a simple code to add an icon initially to system tray. Praveen Chowdam Kumar

        Mircea PuiuM Offline
        Mircea PuiuM Offline
        Mircea Puiu
        wrote on last edited by
        #3

        Declare a data member for your dialog: NOTIFYICONDATA nid; Then ZeroMemory(&nid,sizeof(nid)); nid.cbSize = sizeof(NOTIFYICONDATA); nid.hWnd = m_hWnd; nid.uID = 0; nid.uFlags = NIF_ICON | NIF_TIP; nid.uCallbackMessage = 0; nid.hIcon = LoadIcon(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDI_....)); lstrcpy(nid.szTip,"...some text ..."); Shell_NotifyIcon(NIM_ADD,&nid); ... and do not forget to remove the icon from tray when ready :-) SkyWalker

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups