|
-
September 3rd, 2010, 11:36 AM
#1
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.
-
September 3rd, 2010, 11:57 AM
#2
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
-
September 3rd, 2010, 04:00 PM
#3
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.
-
September 3rd, 2010, 07:05 PM
#4
Re: MFC & VC++ .Net w/WinForms
 Originally Posted by David Anton
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.
-
September 3rd, 2010, 10:43 PM
#5
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.
-
September 4th, 2010, 12:55 AM
#6
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|