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. Custom icon for an app

Custom icon for an app

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++
5 Posts 4 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
    Alton Williams
    wrote on last edited by
    #1

    HI all, When creating an MFC (SDI / MDI). How do I get the app (EXE file) to display an icon of my choice in the directory area, instead of the annoying default IDR_MAINFRAME? Also, the with associated document, should I decided to serialise them. Your guruship is most welcome. Alton

    B M D 3 Replies Last reply
    0
    • A Alton Williams

      HI all, When creating an MFC (SDI / MDI). How do I get the app (EXE file) to display an icon of my choice in the directory area, instead of the annoying default IDR_MAINFRAME? Also, the with associated document, should I decided to serialise them. Your guruship is most welcome. Alton

      B Offline
      B Offline
      Blake Miller
      wrote on last edited by
      #2

      Edit the two default icons presented in the Resources tab. There should already be one for the EXE and another for the document. If you want them to be different for some reason, then add additional icons to the resources and track down where they are loaded and assigned. Override those functions to return the icons of your choosing loaded from the resources.

      A 1 Reply Last reply
      0
      • B Blake Miller

        Edit the two default icons presented in the Resources tab. There should already be one for the EXE and another for the document. If you want them to be different for some reason, then add additional icons to the resources and track down where they are loaded and assigned. Override those functions to return the icons of your choosing loaded from the resources.

        A Offline
        A Offline
        Alton Williams
        wrote on last edited by
        #3

        Tried that, It works for the frame when app is up and running. I've also rename say IDI_ICON1 to IDR_MAINFRAME and puts up a stubborn resistance. Thanks, Blake anyway. Alton

        1 Reply Last reply
        0
        • A Alton Williams

          HI all, When creating an MFC (SDI / MDI). How do I get the app (EXE file) to display an icon of my choice in the directory area, instead of the annoying default IDR_MAINFRAME? Also, the with associated document, should I decided to serialise them. Your guruship is most welcome. Alton

          M Offline
          M Offline
          Michael Dunn
          wrote on last edited by
          #4

          Explorer shows the icon with the lowest resource ID, so create a new icon and give it ID 1 (or anything lower than IDR_MAINFRAME). --Mike-- LINKS~! Ericahist updated! | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ Strange things are afoot at the U+004B U+20DD

          1 Reply Last reply
          0
          • A Alton Williams

            HI all, When creating an MFC (SDI / MDI). How do I get the app (EXE file) to display an icon of my choice in the directory area, instead of the annoying default IDR_MAINFRAME? Also, the with associated document, should I decided to serialise them. Your guruship is most welcome. Alton

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

            The easiest way to do this is to simply replace the two .ico files.


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

            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