CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2010
    Posts
    3

    Look & feel of MFC-programs

    Since a view days I am useing MS-VS C++ 2010 on a Win-7-PC and it works well, but my windows-appls looks like in win 2k or XP, not like Windows-7. How can I tell my project to display the win-controls like in other win-7-programs? Thanks from Germany.

  2. #2
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: Look & feel of MFC-programs

    Did you use the project wizard to create a new MFC project?
    If so, in one of the steps it asks to include a common control manifest. You need that to enable themes.
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

  3. #3
    Join Date
    Jul 2010
    Posts
    3

    Re: Look & feel of MFC-programs

    Use XP-Controls is set. What I have to set within my Project-settings?

  4. #4
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: Look & feel of MFC-programs

    When you are using the MFC wizard to create a new project, on the "Advanced features" page it says "Common Control Manifest". That needs to be enabled for themes to work.

    Are you using UNICODE or not? Check this in project settings > General > Character set.
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

  5. #5
    Join Date
    Jul 2010
    Posts
    15

    Re: Look & feel of MFC-programs

    If you have still troubles, see here: http://www.codeguru.com/cpp/controls...icle.php/c5227

    This still works for me.

  6. #6
    Join Date
    Jul 2010
    Posts
    3

    Re: Look & feel of MFC-programs

    I tryed the steps in the link above -> it do not work! I can't beleve that it is so difficult to tell him to use the new controls-design?! Is there no other way? Please help me!!!!!!

  7. #7
    Join Date
    Oct 2009
    Posts
    577

    Smile Re: Look & feel of MFC-programs

    Quote Originally Posted by kju@thegeckoman.de View Post
    I tryed the steps in the link above -> it do not work! I can't beleve that it is so difficult to tell him to use the new controls-design?! Is there no other way? Please help me!!!!!!
    MFC is about 17 years old. If you want the newest controls and shapes you better would go for Windows Forms and managed (.NET) code (managed C++ or C#).

    To "sparkle" VS2010 MFC with W7 features you may read the articles:

    http://www.codeguru.com/cpp/cpp/cpp_....php/c14929__2
    http://blogs.msdn.com/b/somasegar/ar...windows-7.aspx
    http://www.codeguru.com/forum/showthread.php?t=500218

    Regards, Alex

  8. #8
    Join Date
    Jul 2005
    Location
    Netherlands
    Posts
    2,042

    Re: Look & feel of MFC-programs

    Quote Originally Posted by itsmeandnobodyelse View Post
    MFC is about 17 years old. If you want the newest controls and shapes you better would go for Windows Forms and managed (.NET) code (managed C++ or C#).
    No offense, but that's a load of crap. That's like saying you shouldn't use computers, because they have been around for 50 years. Heck, people have had a brain for millenia, so why still use yours, right?

    There are pros and cons to both MFC and Windows Forms (and WPF, and...), and a comparison based on sound reasons could lead to the conclusion that any one of them is best suited for a particular project. The fact that something has been around for 17 years already and is still being used is IMO a definite pro.
    Cheers, D Drmmr

    Please put [code][/code] tags around your code to preserve indentation and make it more readable.

    As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky

  9. #9
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: Look & feel of MFC-programs

    Quote Originally Posted by itsmeandnobodyelse View Post
    MFC is about 17 years old. If you want the newest controls and shapes you better would go for Windows Forms and managed (.NET) code (managed C++ or C#).
    Sorry to burst your bubble, but the latest version of MFC has the capability to make it easier to design modern looking UIs than compared to C# using the .NET framework.
    The latest version of MFC for example has full support for the Office 2007 Ribbon bar AND the native Windows 7 Ribbon bar with full support in the resource editor of Visual Studio to graphically design your ribbon. As far as I know, the C#/WinForms world does not yet have a graphical designer for Ribbon bars.

    To the OP, you still did not reply to my question "Are you using UNICODE or not? Check this in project settings > General > Character set."

    Anyway, if you still have problems, can you post your project (remove temporary files) so we can take a look at it why it's not working?
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured