Click to See Complete Forum and Search --> : MFC & VC++ .Net w/WinForms
ADSOFT
September 3rd, 2010, 11:36 AM
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.
Alex F
September 3rd, 2010, 11:57 AM
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
David Anton
September 3rd, 2010, 04:00 PM
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.
ADSOFT
September 3rd, 2010, 07:05 PM
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?
David Anton
September 3rd, 2010, 10:43 PM
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.
Alex F
September 4th, 2010, 12:55 AM
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#.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.