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. Changing CMainFrame Minimize ICON

Changing CMainFrame Minimize ICON

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

    I changed the icon and put the following code in

    HICON icon = LoadIcon(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDR\_MAINFRAME));
    SetIcon(icon, FALSE);
    

    in

    int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)

    and yet I still have the MFC icon when the Windows is minimized in the task bar Thanks

    D 1 Reply Last reply
    0
    • F ForNow

      I changed the icon and put the following code in

      HICON icon = LoadIcon(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDR\_MAINFRAME));
      SetIcon(icon, FALSE);
      

      in

      int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)

      and yet I still have the MFC icon when the Windows is minimized in the task bar Thanks

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Did you change the .ico file in the res folder?

      "One man's wage rise is another man's price increase." - Harold Wilson

      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

      "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

      F 1 Reply Last reply
      0
      • D David Crow

        Did you change the .ico file in the res folder?

        "One man's wage rise is another man's price increase." - Harold Wilson

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

        F Offline
        F Offline
        ForNow
        wrote on last edited by
        #3

        In Visual Studio I open up the .ico FILE (which is in the res folder) I erase what there and selecting the TEXT tool I type what I want do a save. However when I go into file explorer it still appear as the original MFC icon/bitmap

        D 1 Reply Last reply
        0
        • F ForNow

          In Visual Studio I open up the .ico FILE (which is in the res folder) I erase what there and selecting the TEXT tool I type what I want do a save. However when I go into file explorer it still appear as the original MFC icon/bitmap

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          Sounds like you are only changing one resolution.

          "One man's wage rise is another man's price increase." - Harold Wilson

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

          F 1 Reply Last reply
          0
          • D David Crow

            Sounds like you are only changing one resolution.

            "One man's wage rise is another man's price increase." - Harold Wilson

            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

            "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

            F Offline
            F Offline
            ForNow
            wrote on last edited by
            #5

            I was able to modify the first 8 resolutions but for the last 5 the drawing tool bar gets grayed out

            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