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

Managed C++/CLI

 
GeneralRe: closing a form/dialog Pin
Christian Graus16-Mar-05 15:43
protectorChristian Graus16-Mar-05 15:43 
GeneralRe: closing a form/dialog Pin
Anonymous18-Mar-05 20:58
Anonymous18-Mar-05 20:58 
QuestionCan i write a Dialog Based Program on DLL Pin
popo8414-Mar-05 15:47
popo8414-Mar-05 15:47 
AnswerRe: Can i write a Dialog Based Program on DLL Pin
User 91483328-Mar-05 12:02
User 91483328-Mar-05 12:02 
Generalerror C2061: syntax error : identifier 'SocketChatClient' Pin
neo_coder14-Mar-05 10:35
neo_coder14-Mar-05 10:35 
GeneralRe: error C2061: syntax error : identifier 'SocketChatClient' Pin
Steve Mayfield14-Mar-05 12:17
Steve Mayfield14-Mar-05 12:17 
GeneralRe: error C2061: syntax error : identifier 'SocketChatClient' Pin
neo_coder15-Mar-05 2:32
neo_coder15-Mar-05 2:32 
GeneralUsing MFC within a .NET application Pin
skonopa14-Mar-05 10:25
skonopa14-Mar-05 10:25 
I have some custom MFC controls that have been written over the past several years right now (and no, these are not ActiveX or COM components. These are straight-up MFC classes), that the powers-to-be does not want to invest the time to rewrite as .NET components.

Before attempting to use the more complex custom controls, as an experiment, I was able to succesfully compile and link a DLL/assembly that would put up a CListCtrl (yes, I konw there is a WinForm equivalent, but this is an experiment, to see if I can at least get a common MFC control to appear in a .NET app). Unfortunatly, when I run the program, it crashes with a "Debug Assertion Fail" error, when a function AfxGetInstanceHandle is called inside the MFC "Create" function for the CListCtrl.

A seperate DLL/assembly which is essentaly a wrapper around the MFC control is used. A reference to the assembly is incuded into the main app in which to try to display this MFC control.

I've searched the this forum as well as the internet as a whole and I've yet to find a good example of just how to embed an MFC control inside of a .NET application.

I've seen/found examples of how to call the .NET framework from inside of an MFC application, but I have not seen it the other way.

I've also seen/found examples of how to create managed wrappers around unmanaged classes, but none of the examples show how to do it around an MFC class.

Has anybody attempted anything like this, and more importantly, has anybody manage to actually get it to work? I'd like to know just how, preferably with a good example, to get an MFC control to work inside of a .NET application.

Thanks
GeneralRe: Using MFC within a .NET application Pin
Sheng Jiang 蒋晟15-Mar-05 17:43
Sheng Jiang 蒋晟15-Mar-05 17:43 
GeneralRe: Using MFC within a .NET application Pin
skonopa22-Mar-05 4:06
skonopa22-Mar-05 4:06 
GeneralRe: Using MFC within a .NET application Pin
Sheng Jiang 蒋晟22-Mar-05 4:17
Sheng Jiang 蒋晟22-Mar-05 4:17 
GeneralRe: Using MFC within a .NET application Pin
skonopa22-Mar-05 7:31
skonopa22-Mar-05 7:31 
GeneralRe: Using MFC within a .NET application Pin
skonopa23-Mar-05 5:37
skonopa23-Mar-05 5:37 
GeneralRe: Using MFC within a .NET application Pin
Sheng Jiang 蒋晟23-Mar-05 8:05
Sheng Jiang 蒋晟23-Mar-05 8:05 
GeneralRe: Using MFC within a .NET application Pin
sunhui1-Jun-05 17:54
sunhui1-Jun-05 17:54 
GeneralLoad custom User control (at runtime) Pin
Lythimer14-Mar-05 10:24
Lythimer14-Mar-05 10:24 
Generalvirtual memory Pin
mpapeo13-Mar-05 22:21
mpapeo13-Mar-05 22:21 
QuestionHow to input and output chinese Pin
ckhung11-Mar-05 9:06
ckhung11-Mar-05 9:06 
AnswerRe: How to input and output chinese Pin
toxcct22-Mar-05 4:16
toxcct22-Mar-05 4:16 
GeneralDirectX MC++ Sprites fail to present Pin
sdnoonan10-Mar-05 18:17
sdnoonan10-Mar-05 18:17 
GeneralInter Process comunication Pin
lightKnight9-Mar-05 18:31
lightKnight9-Mar-05 18:31 
General2.0 beta-1 IDE Pin
TFB9-Mar-05 6:47
TFB9-Mar-05 6:47 
QuestionWinsock Question ? Pin
covansys20008-Mar-05 18:13
covansys20008-Mar-05 18:13 
Generalbarcode on C lang Pin
france_philippines8-Mar-05 14:26
france_philippines8-Mar-05 14:26 
GeneralRe: barcode on C lang Pin
Christian Graus8-Mar-05 14:40
protectorChristian Graus8-Mar-05 14:40 

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.