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. Icon problem

Icon problem

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++debugginghelp
12 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.
  • H Halawlaws

    Hi I have created a new Icon image for my program. I set the small icon and big one to my new icon and everything work fines. The problem is when i open the folder containing my exe file (inside debug): If i chose view -> Large Icons, i see that my app has my new icon BUT IF I CHOSE view -> Small Icons or List or Details, i see that my app icon is not my new one but the standard MFC blue icon. How can i change that? /\|-||\/|/\|)

    E Offline
    E Offline
    Eytukan
    wrote on last edited by
    #2

    good question..! but no clue :( V

    1 Reply Last reply
    0
    • H Halawlaws

      Hi I have created a new Icon image for my program. I set the small icon and big one to my new icon and everything work fines. The problem is when i open the folder containing my exe file (inside debug): If i chose view -> Large Icons, i see that my app has my new icon BUT IF I CHOSE view -> Small Icons or List or Details, i see that my app icon is not my new one but the standard MFC blue icon. How can i change that? /\|-||\/|/\|)

      G Offline
      G Offline
      Graham Bradshaw
      wrote on last edited by
      #3

      In the Icon editor, you'll need to edit both the large (32x32) and small (16x16) images. It sounds as if you've changed the 32x32 image, but not the 16x16 one. An icon can contain multiple images, at different sizes and colour depths, and if you edit the icon, you have to edit them all.

      H 2 Replies Last reply
      0
      • G Graham Bradshaw

        In the Icon editor, you'll need to edit both the large (32x32) and small (16x16) images. It sounds as if you've changed the 32x32 image, but not the 16x16 one. An icon can contain multiple images, at different sizes and colour depths, and if you edit the icon, you have to edit them all.

        H Offline
        H Offline
        Halawlaws
        wrote on last edited by
        #4

        I don't understand In the Icon editor there is only one icon so i edited it /\|-||\/|/\|)

        1 Reply Last reply
        0
        • G Graham Bradshaw

          In the Icon editor, you'll need to edit both the large (32x32) and small (16x16) images. It sounds as if you've changed the 32x32 image, but not the 16x16 one. An icon can contain multiple images, at different sizes and colour depths, and if you edit the icon, you have to edit them all.

          H Offline
          H Offline
          Halawlaws
          wrote on last edited by
          #5

          Ah Ok man thx a lot ur the man But u should do one more thing: remove the following command: SetIcon(m_hIcon, FALSE); /\|-||\/|/\|)

          T 1 Reply Last reply
          0
          • H Halawlaws

            Ah Ok man thx a lot ur the man But u should do one more thing: remove the following command: SetIcon(m_hIcon, FALSE); /\|-||\/|/\|)

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

            Halawlaws wrote: remove the following command: SetIcon(m_hIcon, FALSE); why removing such a code line, that was generate by the wizard ??? it is there to draw the icon in small or high size depending on the program state (size of the window)...


            TOXCCT >>> GEII power
            [toxcct][VisualCalc]

            H 1 Reply Last reply
            0
            • T toxcct

              Halawlaws wrote: remove the following command: SetIcon(m_hIcon, FALSE); why removing such a code line, that was generate by the wizard ??? it is there to draw the icon in small or high size depending on the program state (size of the window)...


              TOXCCT >>> GEII power
              [toxcct][VisualCalc]

              H Offline
              H Offline
              Halawlaws
              wrote on last edited by
              #7

              toxcct wrote: why removing such a code line, that was generate by the wizard ??? Coz if u dont it wont work da :mad: /\|-||\/|/\|)

              T 1 Reply Last reply
              0
              • H Halawlaws

                toxcct wrote: why removing such a code line, that was generate by the wizard ??? Coz if u dont it wont work da :mad: /\|-||\/|/\|)

                T Offline
                T Offline
                toxcct
                wrote on last edited by
                #8

                :laugh::laugh::laugh::laugh: it's always been morking for me... i think you've broken one more thing, because it should work without removing that line...


                TOXCCT >>> GEII power
                [toxcct][VisualCalc]

                1 Reply Last reply
                0
                • H Halawlaws

                  Hi I have created a new Icon image for my program. I set the small icon and big one to my new icon and everything work fines. The problem is when i open the folder containing my exe file (inside debug): If i chose view -> Large Icons, i see that my app has my new icon BUT IF I CHOSE view -> Small Icons or List or Details, i see that my app icon is not my new one but the standard MFC blue icon. How can i change that? /\|-||\/|/\|)

                  E Offline
                  E Offline
                  Eytukan
                  wrote on last edited by
                  #9

                  Gotcha!!.. got the remedy for ur ICON problem, on the resource tab..right click on the "IDR_MAINFRAME" icon.. see its property, its just accessing the ICON from /res/myapp.ico.. ("resource directory").. So go to your project folder, open the "res" folder, Replace the "default" MFC icon there with your Colorful ICON :) then Bulid your project, now no problem which mode u select to view your folder, the icon'd be the same.. try and reply.. V

                  H 1 Reply Last reply
                  0
                  • E Eytukan

                    Gotcha!!.. got the remedy for ur ICON problem, on the resource tab..right click on the "IDR_MAINFRAME" icon.. see its property, its just accessing the ICON from /res/myapp.ico.. ("resource directory").. So go to your project folder, open the "res" folder, Replace the "default" MFC icon there with your Colorful ICON :) then Bulid your project, now no problem which mode u select to view your folder, the icon'd be the same.. try and reply.. V

                    H Offline
                    H Offline
                    Halawlaws
                    wrote on last edited by
                    #10

                    No man still the same problem. I think by defult the MFC draws the small icon stored in the registry. Thx for trying though /\|-||\/|/\|)

                    G 1 Reply Last reply
                    0
                    • H Halawlaws

                      No man still the same problem. I think by defult the MFC draws the small icon stored in the registry. Thx for trying though /\|-||\/|/\|)

                      G Offline
                      G Offline
                      GKarRacer
                      wrote on last edited by
                      #11

                      No, it doesn't. As mentioned above the same IDR_MAINFRAME icon in your resource contains both the large and small icons. To switch between them in the resource editor: Open the icon to edit From the Menu highlight Image/Current Icon Type. An additional menu should open showing you all of the different images for this one icon resource. Click on the selection you wish to edit. If this is a new MFC project using VC++.Net, you may icons for several different sizes and bit widths, e.g. 16x16 16 color, 16x16 256 color, 32x32 16 color, 48x48 true color, etc. You will need to edit each one individually. You may also choose to just delete the extra ones that you don't need. At the very least keep the 16x16 and 32x32 16 color versions.

                      H 1 Reply Last reply
                      0
                      • G GKarRacer

                        No, it doesn't. As mentioned above the same IDR_MAINFRAME icon in your resource contains both the large and small icons. To switch between them in the resource editor: Open the icon to edit From the Menu highlight Image/Current Icon Type. An additional menu should open showing you all of the different images for this one icon resource. Click on the selection you wish to edit. If this is a new MFC project using VC++.Net, you may icons for several different sizes and bit widths, e.g. 16x16 16 color, 16x16 256 color, 32x32 16 color, 48x48 true color, etc. You will need to edit each one individually. You may also choose to just delete the extra ones that you don't need. At the very least keep the 16x16 and 32x32 16 color versions.

                        H Offline
                        H Offline
                        Halawlaws
                        wrote on last edited by
                        #12

                        Thx man It finally worked /\|-||\/|/\|)

                        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