none
How to add Skin/Theme to VC++ MFC Application RRS feed

  • Question

  • How to add skin/Theme to full VC++ MFC Application.

    default Theme is looks like a old window screen . so i trying to change the theme of the application.

    i need to change the good (look and feel) Skin/Theme.

    How Can i achieve this? There is any possible to do this?

    Thanks

    Wednesday, April 15, 2015 9:37 AM

Answers

  • First way:

    The MFC that is in use with VC2008 and later you have the possibility to use the CMFCVisualManager* classes and you can derive an own class that has a skin you create on your own. The problem is this classes are not very well documented and I would not know there is an good example that shows on how to do that.

    2nd way:

    You use an own skin framework and do all by your own, the advantage is you know how your skin manager works, the bad thing may be, it can be a lot of work dependig what controls / window parts you want to skin. Here a nice example on making an own skin manager:

    http://www.codeproject.com/Articles/744/EZSkin-A-Primitive-Framework-for-building-skinnabl

    3rd way:

    Using commerical tools. The good thing is you have support, if there are problems. The bad part is you must pay money:

    http://skincrafter.com/

    http://www.stardock.com/corporatesolutions/DirectSkin/

    http://www.codejock.com/products/SkinFramework/


    Best regards

    Bordon

    Note: Posted code pieces may not have a good programming style and may not perfect. It is also possible that they do not work in all situations. Code pieces are only indended to explain something particualar.


    • Edited by Bordon Wednesday, April 15, 2015 10:36 AM
    • Marked as answer by Shu 2017 Monday, April 27, 2015 1:32 PM
    Wednesday, April 15, 2015 10:36 AM
  • Dialogs are not supported by the CMFCVisualManager, therefore you will not see any changes. I enhanced the skin stuff to support Dialogs also, it is a lot work, that wastes a lot time to have a window with a different look...

    If you have a normal MFC based application you can select the skin / theme feature in the MFC Wizard.

    At all it is like I said it is a lot time you need to understand this stuff, and you need a lot debugging, testing, code changing since the Theming stuff is more or less not documented.


    Best regards

    Bordon

    Note: Posted code pieces may not have a good programming style and may not perfect. It is also possible that they do not work in all situations. Code pieces are only indended to explain something particualar.

    • Marked as answer by Shu 2017 Monday, April 27, 2015 1:33 PM
    Wednesday, April 15, 2015 12:41 PM

All replies

  • First way:

    The MFC that is in use with VC2008 and later you have the possibility to use the CMFCVisualManager* classes and you can derive an own class that has a skin you create on your own. The problem is this classes are not very well documented and I would not know there is an good example that shows on how to do that.

    2nd way:

    You use an own skin framework and do all by your own, the advantage is you know how your skin manager works, the bad thing may be, it can be a lot of work dependig what controls / window parts you want to skin. Here a nice example on making an own skin manager:

    http://www.codeproject.com/Articles/744/EZSkin-A-Primitive-Framework-for-building-skinnabl

    3rd way:

    Using commerical tools. The good thing is you have support, if there are problems. The bad part is you must pay money:

    http://skincrafter.com/

    http://www.stardock.com/corporatesolutions/DirectSkin/

    http://www.codejock.com/products/SkinFramework/


    Best regards

    Bordon

    Note: Posted code pieces may not have a good programming style and may not perfect. It is also possible that they do not work in all situations. Code pieces are only indended to explain something particualar.


    • Edited by Bordon Wednesday, April 15, 2015 10:36 AM
    • Marked as answer by Shu 2017 Monday, April 27, 2015 1:32 PM
    Wednesday, April 15, 2015 10:36 AM
  • I'm using Visual Studio 2015 Preview. how can i use CMFCVisualManager*  as per First Way?
    Wednesday, April 15, 2015 10:45 AM
  • Create an project using the MFC Wizard and enadle the theming, than you need to check out the used classes (i.e. CMFCVisualManagerOffice2007). In the next step I'd derive the paricular CMFCVisualManager* class and would use my own still unchanged class to see if everything is still working. After that you can begin doing your changes. But it is like I said, it is not well documented, there are no good examples (at least I do not know one).

    A few years ago I was fiddeling with the CMFCVisualManager*. It is not an easy task do do all the changes you need. At all my bottom line was it is a tolal waste of time. You need a lot of time to have a application that looks differentd and still has the same functionality....


    Best regards

    Bordon

    Note: Posted code pieces may not have a good programming style and may not perfect. It is also possible that they do not work in all situations. Code pieces are only indended to explain something particualar.

    Wednesday, April 15, 2015 10:51 AM
  • I put

    CMFCVisualManagerOffice2007::SetStyle(CMFCVisualManagerOffice2007::Office2007_Aqua);

    into OnInitDialog(). but my output screen did not show any effects. it show normal output screen?

    Do u have any samples/demos to did this?

    Wednesday, April 15, 2015 11:01 AM
  • Dialogs are not supported by the CMFCVisualManager, therefore you will not see any changes. I enhanced the skin stuff to support Dialogs also, it is a lot work, that wastes a lot time to have a window with a different look...

    If you have a normal MFC based application you can select the skin / theme feature in the MFC Wizard.

    At all it is like I said it is a lot time you need to understand this stuff, and you need a lot debugging, testing, code changing since the Theming stuff is more or less not documented.


    Best regards

    Bordon

    Note: Posted code pieces may not have a good programming style and may not perfect. It is also possible that they do not work in all situations. Code pieces are only indended to explain something particualar.

    • Marked as answer by Shu 2017 Monday, April 27, 2015 1:33 PM
    Wednesday, April 15, 2015 12:41 PM
  • About the 2nd way, you shouldn't expect source code from 2000 to work....
    Monday, December 5, 2016 8:13 PM