[RESOLVED] GUI help needed- beyond MFC?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Thread: [RESOLVED] GUI help needed- beyond MFC?

  1. #1
    Join Date
    Sep 2010
    Posts
    9

    [RESOLVED] GUI help needed- beyond MFC?

    Hi folks,

    This is my first posting, so I'm hoping I've put it in the correct forum.

    I have some experience making GUIs using MFC, but when you do that, all your applications have a distinctive, rather boring look and feel. Then I look at applications such as RealPlayer that look much fancier, and I'm wondering how they do that. The controls are all equivalent to those present in MFC (eg., buttons, menus, scroll-bars, etc), but their appearance is customized. I think some applications call this a "skin".

    I've been assigned to create a user interface for a new product, and I wanted to do some of this custom skinning. Is this something that can be done with MFC? Is there some other package that I should use? I have seen enough GUIs like this that I know there must be a standard, accepted way of doing it.

    As an aside, I currently have Visual C++ 6. I am planning to buy Visual Studio 2010 (however, if there's a way to make my GUI with the old software, I'd welcome that- Visual Studio is so expensive!). Maybe my problem is simply that my software is too old. Please let me know.

    Thank you much for your help.

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,254

    Re: GUI help needed- beyond MFC?

    Are you forced to code in native C++ or can you code in a .Net language?

  3. #3
    Join Date
    Sep 2010
    Posts
    9

    Re: GUI help needed- beyond MFC?

    I think I'm allowed to use .Net
    Is .Net the way to go? What are the advantages and disadvantages?

    Thanks for replying :-)

  4. #4
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,254

    Re: GUI help needed- beyond MFC?

    Quote Originally Posted by YungChewie View Post
    I think I'm allowed to use .Net
    Is .Net the way to go? What are the advantages and disadvantages?

    Thanks for replying :-)
    You're going to have to research this for yourself, but WPF is going to allow way more skinning options and features than MFC.

  5. #5
    Join Date
    Sep 2010
    Posts
    9

    Re: GUI help needed- beyond MFC?

    I just looked up about WPF, and it does seem to do the stuff I need.

    I have just one more question- I am concerned about the performance penalty that the .Net VM might have on my code. In your experience, how much does it slow down? Would I be able to write my UI using the .Net Framework, but still use native C++ for my program's underlying engine?

    If there's a way to do it, I can figure it out, but I'd like to know whether it's possible before I start, so that I don't waste a lot of time going down the wrong path.

  6. #6
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,254

    Re: GUI help needed- beyond MFC?

    Quote Originally Posted by YungChewie View Post
    In your experience, how much does it slow down?
    Not enough to worry about if any.

    Quote Originally Posted by YungChewie View Post
    Would I be able to write my UI using the .Net Framework, but still use native C++ for my program's underlying engine?
    You might want to write a couple of test apps to determine if it's really necessary or if writing a portion of the app in native C++ would be any improvement. I doubt it will and would focus on learning to write proper C# code. Like C++ (or assembly), you can write slow code in C#, but like the other two languages you can also write fast, efficient code.

  7. #7
    Join Date
    Sep 2010
    Posts
    9

    Re: GUI help needed- beyond MFC?

    I was thinking of using C++/CLI, in the theory that it would be the most similar to the C++ that I know. Do you think C# is a better bet?

  8. #8
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,254

    Re: GUI help needed- beyond MFC?

    Quote Originally Posted by YungChewie View Post
    I was thinking of using C++/CLI, in the theory that it would be the most similar to the C++ that I know. Do you think C# is a better bet?
    Personally, I do. I really don't see any reason to use Managed C++. I feel if I ever needed to do something in native C++ that I couldn't do in C#, I would create either a native DLL and pinvoke to it or create a native C++ COM dll using ATL.

    I'm proficient in C++, MFC, ATL and a bunch of other native TLA's. I'm also proficient in C#, WPF, and WCF.

    I feel if you are starting a new project, either choose the native route (using MFC, ATL/WTL or some other library) or choose the managed code route (and use C#). If you need to write something natively, then use the PInvoke or COM method.

    Coding in managed C++ is just horrible in my opinion and it only offers one thing to a C++ programmer: the comfort level of making one feel like they're coding in [native] C++. But in doing so, the native C++ developer has to work harder to convert the native types into managed types. There's more to learn, and more chances to get this wrong that you don't have in a purely managed C# solution.

    Read some of my observations on Managed C++ at the end of the following post:

    http://www.codeguru.com/forum/showth...=501921&page=3

  9. #9
    Join Date
    Sep 2010
    Posts
    9

    Re: GUI help needed- beyond MFC?

    Thanks so much- you rock.

    I didn't know, because I have used neither Managed C++ nor C#. I'll have to bust out a book on C#. I can learn just about anything, but I hope my employer will be patient enough with me. I suspect I will be asking a lot more questions on these forums. Thanks for making my first experience with a programming forum successful.

Tags for this Thread

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center