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. Task bar Icon

Task bar Icon

Scheduled Pinned Locked Moved C / C++ / MFC
6 Posts 5 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.
  • A Offline
    A Offline
    akshita_15
    wrote on last edited by
    #1

    Hai How can we set an icon in the task bar :confused: Thanks in advance:)

    L _ T 3 Replies Last reply
    0
    • A akshita_15

      Hai How can we set an icon in the task bar :confused: Thanks in advance:)

      L Offline
      L Offline
      Laxman Auti
      wrote on last edited by
      #2

      akshita_15 wrote:

      How can we set an icon in the task bar

      See Here[^] Knock out 't' from can't, You can if you think you can :cool:

      1 Reply Last reply
      0
      • A akshita_15

        Hai How can we set an icon in the task bar :confused: Thanks in advance:)

        _ Offline
        _ Offline
        _AnsHUMAN_
        wrote on last edited by
        #3

        Put this code in OnInitDialog function of your Dlg Class if you are working on a MFC dialog based application

        HICON m_hIcon = (HICON)::LoadImage(AfxGetResourceHandle(),
        MAKEINTRESOURCE(IDI_MYICON), IMAGE_ICON,16, 16, 0); 
        SetIcon (m_hIcon,false);
        ModifyStyleEx(0, WS_EX_APPWINDOW);
        

        Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_

        F 1 Reply Last reply
        0
        • _ _AnsHUMAN_

          Put this code in OnInitDialog function of your Dlg Class if you are working on a MFC dialog based application

          HICON m_hIcon = (HICON)::LoadImage(AfxGetResourceHandle(),
          MAKEINTRESOURCE(IDI_MYICON), IMAGE_ICON,16, 16, 0); 
          SetIcon (m_hIcon,false);
          ModifyStyleEx(0, WS_EX_APPWINDOW);
          

          Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_

          F Offline
          F Offline
          FarPointer
          wrote on last edited by
          #4

          You also need to destroy the icon by calling the DestroyIcon(HICON ) to prevent resource leak . Regards, FarPointer Blog:http://farpointer.blogspot.com/

          _ 1 Reply Last reply
          0
          • F FarPointer

            You also need to destroy the icon by calling the DestroyIcon(HICON ) to prevent resource leak . Regards, FarPointer Blog:http://farpointer.blogspot.com/

            _ Offline
            _ Offline
            _AnsHUMAN_
            wrote on last edited by
            #5

            Yeap buddy, Sometimes the code given is not optimized. This was one of those. Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_

            1 Reply Last reply
            0
            • A akshita_15

              Hai How can we set an icon in the task bar :confused: Thanks in advance:)

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

              akshita_15 wrote:

              How can we set an icon in the task bar :confused:

              the QWin32 way of doing sam e:- HERE[^]

              "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 Support CRY- Child Relief and You

              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