CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2004
    Posts
    1,352

    MFC & VC++ .Net w/WinForms

    I'm interested in porting over an MFC app to VC++ .Net.

    I Need to Embedd a WinForm and Open a Access Database in .Net. I want to slowly start porting over the App to .Net.

    Can someone maybe post a link that would explain how to combine Managed and UnManaged code in the same App.
    Rate this post if it helped you.

  2. #2
    Join Date
    Jul 2002
    Posts
    2,543

    Re: MFC & VC++ .Net w/WinForms

    This is called IJW (It Just Works), you can mix managed and unmanaged code in C++/CLI. For example, you can call any Windows API directly from C++/CLI code, without PInvoke.
    http://www.codeproject.com/KB/mcpp/nishijw01.aspx

  3. #3
    Join Date
    Aug 2005
    Posts
    198

    Re: MFC & VC++ .Net w/WinForms

    WinForms is becoming obsolete (no new features as of a couple of years ago and probably about 10 years left for support), with WPF being the 'new' way, so you might want to look ahead to this being the goal - although unfortunately you'll have to wait for VC++ to catch up since it doesn't offer the ability to create WPF apps yet.
    Last edited by David Anton; September 3rd, 2010 at 04:15 PM.
    David Anton
    Convert between VB, C#, C++, & Java
    www.tangiblesoftwaresolutions.com
    Instant C# - VB to C# Converter
    Instant VB - C# to VB Converter

  4. #4
    Join Date
    Jun 2004
    Posts
    1,352

    Re: MFC & VC++ .Net w/WinForms

    Quote Originally Posted by David Anton View Post
    WinForms is becoming obsolete (no new features as of a couple of years ago and probably about 10 years left for support), with WPF being the 'new' way, so you might want to look ahead to this being the goal - although unfortunately you'll have to wait for VC++ to catch up since it doesn't offer the ability to create WPF apps yet.

    Really,

    I would think that since WinForms is part of C# and the .Net Environment that it would be around for a while. What got me interested in VC++ .Net vs. C# was that I saw stdio.h in a VC++ .nET App. I realized at the point that I could port alot of my C/C++ Ansi Code and Tap into the .Net environment.

    Are you saying that Microsoft is banking more on WPF than .Net?
    Rate this post if it helped you.

  5. #5
    Join Date
    Aug 2005
    Posts
    198

    Re: MFC & VC++ .Net w/WinForms

    WinForms is not part of C# or any language - it's an older part of the .NET framework and is definitely being considered 'legacy' code these days. WPF is the replacement and historically when Microsoft creates a replacement for something, that 'something' goes away within a few years - I'll give it 10 years tops.
    David Anton
    Convert between VB, C#, C++, & Java
    www.tangiblesoftwaresolutions.com
    Instant C# - VB to C# Converter
    Instant VB - C# to VB Converter

  6. #6
    Join Date
    Jul 2002
    Posts
    2,543

    Re: MFC & VC++ .Net w/WinForms

    Starting from Windows Vista, the native graphics technology is DirectX, while GDI is implemented by software emulation level. This is why it is a good idea to use DirectX-based technologies like WPF.
    Regarding C++/CLI, this language has minimal Windows Forms support in IDE, and no WPF support at all. Of course, it is possible to write everything manually. C++/CLI is used mostly for interoperability between managed and unmanaged code. Everything that can be written in pure .NET (UI, database programming, networking etc.) is better to do in C#.

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