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