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 the icons displayed on an outlook bar style property sheet (class CMFCPropertySheet)

Changing the icons displayed on an outlook bar style property sheet (class CMFCPropertySheet)

Scheduled Pinned Locked Moved C / C++ / MFC
11 Posts 4 Posters 1 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.
  • R Offline
    R Offline
    rdeekonda
    wrote on last edited by
    #1

    I am using an outlook bar style property sheet with 3 property pages as the main window of my application.I am unable to change the tab icons displayed on the property sheet.Please suggest any strategy to change the icons.I have gone through all the documentation related to property sheets and also googled but I couldn't get a solution. I have code which is not working and will post it if required.

    Deekonda Ramesh

    L Richard DeemingR 2 Replies Last reply
    0
    • R rdeekonda

      I am using an outlook bar style property sheet with 3 property pages as the main window of my application.I am unable to change the tab icons displayed on the property sheet.Please suggest any strategy to change the icons.I have gone through all the documentation related to property sheets and also googled but I couldn't get a solution. I have code which is not working and will post it if required.

      Deekonda Ramesh

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      See CMFCPropertySheet::SetIconsList - Microsoft Docs[^]

      R 1 Reply Last reply
      0
      • R rdeekonda

        I am using an outlook bar style property sheet with 3 property pages as the main window of my application.I am unable to change the tab icons displayed on the property sheet.Please suggest any strategy to change the icons.I have gone through all the documentation related to property sheets and also googled but I couldn't get a solution. I have code which is not working and will post it if required.

        Deekonda Ramesh

        Richard DeemingR Offline
        Richard DeemingR Offline
        Richard Deeming
        wrote on last edited by
        #3

        You have already posted this in QA: I am unable to change the bitmap images dispayed on an outlookbar style propertysheet[^]


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

        R 1 Reply Last reply
        0
        • L Lost User

          See CMFCPropertySheet::SetIconsList - Microsoft Docs[^]

          R Offline
          R Offline
          rdeekonda
          wrote on last edited by
          #4

          SetIconsList works only once before the call to DoModal() on the property sheet. When It called a second time it asserts in afxpropertysheet.cpp : at line ENSURE(m_Icons.GetSafeHandle()==NULL).

          Deekonda Ramesh

          V 1 Reply Last reply
          0
          • Richard DeemingR Richard Deeming

            You have already posted this in QA: I am unable to change the bitmap images dispayed on an outlookbar style propertysheet[^]


            "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

            R Offline
            R Offline
            rdeekonda
            wrote on last edited by
            #5

            I thought it might be faster getting an answer in the discussions.

            Deekonda Ramesh

            L 1 Reply Last reply
            0
            • R rdeekonda

              SetIconsList works only once before the call to DoModal() on the property sheet. When It called a second time it asserts in afxpropertysheet.cpp : at line ENSURE(m_Icons.GetSafeHandle()==NULL).

              Deekonda Ramesh

              V Offline
              V Offline
              Victor Nijegorodov
              wrote on last edited by
              #6

              In such a case I'd recommend to subclass the CMFCPropertySheet (derive your own class from it) and overload the SetIconsList method. Or better implement the new method (say, ReplaceIcon) that would directly manipulate (remove/add/replace an image) with the m_Icons imagelist.

              R 1 Reply Last reply
              0
              • R rdeekonda

                I thought it might be faster getting an answer in the discussions.

                Deekonda Ramesh

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                No, it just means duplicated effort, please use one place only.

                1 Reply Last reply
                0
                • V Victor Nijegorodov

                  In such a case I'd recommend to subclass the CMFCPropertySheet (derive your own class from it) and overload the SetIconsList method. Or better implement the new method (say, ReplaceIcon) that would directly manipulate (remove/add/replace an image) with the m_Icons imagelist.

                  R Offline
                  R Offline
                  rdeekonda
                  wrote on last edited by
                  #8

                  I have derived a class from CMFCPropertySheet and I changed m_Icons member with the new bitmaps.It does not show any change in the displayed icons/bitmaps.

                  Deekonda Ramesh

                  V 1 Reply Last reply
                  0
                  • R rdeekonda

                    I have derived a class from CMFCPropertySheet and I changed m_Icons member with the new bitmaps.It does not show any change in the displayed icons/bitmaps.

                    Deekonda Ramesh

                    V Offline
                    V Offline
                    Victor Nijegorodov
                    wrote on last edited by
                    #9

                    Then investigate the afxpropertysheet.cpp (and probably some more (friend and other classes) source code to see where and how the m_Icons imagelist is involved and try to change it according to your needs! :laugh:

                    R 1 Reply Last reply
                    0
                    • V Victor Nijegorodov

                      Then investigate the afxpropertysheet.cpp (and probably some more (friend and other classes) source code to see where and how the m_Icons imagelist is involved and try to change it according to your needs! :laugh:

                      R Offline
                      R Offline
                      rdeekonda
                      wrote on last edited by
                      #10

                      CMFCPropertySheet has a member called m_wndPane1. Following approach also did not work. Button images are jumbled up

                        m\_wndPane1.RemoveAllButtons();
                        m\_wndPane1.ClearAll();
                      	
                      	
                        retval=m\_wndPane1.AddButton(m\_bmpimgs\[0\], "Create a Job", 10050, 0);
                        retval=m\_wndPane1.AddButton(m\_bmpimgs\[1\], "Manage a Job", 10051, 1);
                        retval=m\_wndPane1.AddButton(m\_bmpimgs\[2\], "Restore a Job", 10052, 2);
                      	
                        m\_wndPane1.InvalidateButton(0);
                        m\_wndPane1.InvalidateButton(1);
                        m\_wndPane1.InvalidateButton(2);
                      

                      Deekonda Ramesh

                      R 1 Reply Last reply
                      0
                      • R rdeekonda

                        CMFCPropertySheet has a member called m_wndPane1. Following approach also did not work. Button images are jumbled up

                          m\_wndPane1.RemoveAllButtons();
                          m\_wndPane1.ClearAll();
                        	
                        	
                          retval=m\_wndPane1.AddButton(m\_bmpimgs\[0\], "Create a Job", 10050, 0);
                          retval=m\_wndPane1.AddButton(m\_bmpimgs\[1\], "Manage a Job", 10051, 1);
                          retval=m\_wndPane1.AddButton(m\_bmpimgs\[2\], "Restore a Job", 10052, 2);
                        	
                          m\_wndPane1.InvalidateButton(0);
                          m\_wndPane1.InvalidateButton(1);
                          m\_wndPane1.InvalidateButton(2);
                        

                        Deekonda Ramesh

                        R Offline
                        R Offline
                        rdeekonda
                        wrote on last edited by
                        #11

                        Got the answer mostly due to Microsoft Q&A This code placed in the derived property sheet works if the bitmap images are all of exactly the same size Thanks also to Victor Nijegorodov for his suggestions: m_wndPane1.RemoveAllButtons(); retval=m_wndPane1.AddButton(m_bmpimgs[0], "Create a Job", 10050, 0); retval=m_wndPane1.AddButton(m_bmpimgs[1], "Manage a Job", 10051, 1); retval=m_wndPane1.AddButton(m_bmpimgs[2], "Restore a Job", 10052, 2); m_wndPane1.InvalidateButton(0); m_wndPane1.InvalidateButton(1); m_wndPane1.InvalidateButton(2);

                        Deekonda Ramesh

                        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