Click here to Skip to main content
15,912,897 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: question re. portability of an MFC app Pin
Christian Graus7-Jun-05 12:01
protectorChristian Graus7-Jun-05 12:01 
GeneralDrawing simple shapes and controlling them Pin
Hmmkk5-Jun-05 1:23
Hmmkk5-Jun-05 1:23 
GeneralRe: Drawing simple shapes and controlling them Pin
Hmmkk5-Jun-05 2:15
Hmmkk5-Jun-05 2:15 
GeneralFrom, "Windows Forms Programming in C#" Pin
ursus zeta5-Jun-05 10:50
ursus zeta5-Jun-05 10:50 
GeneralRe: From, "Windows Forms Programming in C#" Pin
Hmmkk6-Jun-05 11:01
Hmmkk6-Jun-05 11:01 
Generalconfusing Pin
ursus zeta7-Jun-05 8:16
ursus zeta7-Jun-05 8:16 
GeneralRe: confusing Pin
Hmmkk7-Jun-05 11:43
Hmmkk7-Jun-05 11:43 
Generaltoo much info Pin
ursus zeta10-Jun-05 10:50
ursus zeta10-Jun-05 10:50 
I've never used MFC that much, so I'm not really familar with it.
However, when you use MFC header files as includes to your managed WinForm project, you're just creating potential problems for yourself. MFC, as useful as it is (especially for the Document/View architecture) is an unmanaged class system. And, as such, it is incompatible with the managed .NET classes (unless you use Interop, or other code techniques to facilitate the integration). The .NET design teams realized that MFC and COM and all the pre-.NET legacy code out there that performs so well, should be able to be used in the CLR Runtime environment (or, hell, no one would want to acquire the coding expertise in the new .NET Framework class system). So, they developed Platform Invoke (or Interop) to make these two worlds accessible to each other.
Interop confuses most programmers unfamilar with it (it confuses me, and I've read a fair amount of documentation on it).
Many of the classes in both MFC and .NET are wrappers for the objects and functions from the underlying Win32 system DLLs. But, that's an oversimplification.
I would suggest that you buy yourself a good book on the subject and look through the example code provided, and also, read the documentation included with your Visual Studio .NET install (and the .NET Framework SDK).
The Framework classes in System.Windows.Forms and System.Runtime.Drawing are the managed .NET equivalent of Windows and Windowing techniques, generally, and MFC has similar classes (with completely different syntax and methods). You can use the two together, but, you should have an understanding of the underlying system calls that the wrappers are making, or you'll be colliding with your own code half the time.
And, so, the simple way is to just use one system or the other until you are familar enough with each to integrate them.
There is a good Microsoft book on this subject:
Programming with Microsoft Visual C++ .NET, Sixth Edition (Core Reference)
by George/Kruglinski Shepherd
General3 occurences of error C2039 Pin
joseph19503-Jun-05 4:36
joseph19503-Jun-05 4:36 
GeneralRe: 3 occurences of error C2039 Pin
toxcct5-Jun-05 3:33
toxcct5-Jun-05 3:33 
GeneralRe: 3 occurences of error C2039 Pin
joseph19506-Jun-05 2:52
joseph19506-Jun-05 2:52 
GeneralRe: 3 occurences of error C2039 Pin
toxcct6-Jun-05 2:57
toxcct6-Jun-05 2:57 
GeneralRe: 3 occurences of error C2039 Pin
joseph19506-Jun-05 7:38
joseph19506-Jun-05 7:38 
Generalremoving variable Pin
joseph19503-Jun-05 2:56
joseph19503-Jun-05 2:56 
GeneralRe: removing variable Pin
toxcct3-Jun-05 3:33
toxcct3-Jun-05 3:33 
GeneralRe: removing variable Pin
joseph19503-Jun-05 4:15
joseph19503-Jun-05 4:15 
GeneralLabel Text problems Pin
Hmmkk2-Jun-05 8:34
Hmmkk2-Jun-05 8:34 
GeneralRe: Label Text problems Pin
Christian Graus2-Jun-05 10:02
protectorChristian Graus2-Jun-05 10:02 
GeneralRe: Label Text problems Pin
Hmmkk2-Jun-05 10:25
Hmmkk2-Jun-05 10:25 
GeneralRe: Label Text problems Pin
Christian Graus2-Jun-05 10:30
protectorChristian Graus2-Jun-05 10:30 
GeneralRe: Label Text problems Pin
Hmmkk2-Jun-05 10:38
Hmmkk2-Jun-05 10:38 
GeneralRe: Label Text problems Pin
Christian Graus2-Jun-05 10:46
protectorChristian Graus2-Jun-05 10:46 
GeneralRe: Label Text problems Pin
Hmmkk2-Jun-05 10:48
Hmmkk2-Jun-05 10:48 
GeneralRe: Label Text problems Pin
Hmmkk2-Jun-05 10:57
Hmmkk2-Jun-05 10:57 
GeneralRe: Label Text problems Pin
Christian Graus2-Jun-05 12:18
protectorChristian Graus2-Jun-05 12:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.