Click here to Skip to main content
15,913,944 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to post a message to main frame of singledocument app from a static function? Pin
vikramlinux9-Mar-04 23:32
vikramlinux9-Mar-04 23:32 
AnswerRe: How to post a message to main frame of singledocument app from a static function? Pin
Prakash Nadar9-Mar-04 23:46
Prakash Nadar9-Mar-04 23:46 
AnswerRe: How to post a message to main frame of singledocument app from a static function? Pin
Robert A. T. Káldy9-Mar-04 23:56
Robert A. T. Káldy9-Mar-04 23:56 
GeneralRe: How to post a message to main frame of singledocument app from a static function? Pin
freehawk10-Mar-04 0:22
freehawk10-Mar-04 0:22 
GeneralRe: How to post a message to main frame of singledocument app from a static function? Pin
Robert A. T. Káldy10-Mar-04 0:27
Robert A. T. Káldy10-Mar-04 0:27 
GeneralRe: How to post a message to main frame of singledocument app from a static function? Pin
freehawk10-Mar-04 20:20
freehawk10-Mar-04 20:20 
Generalusing managed class in VC++ .Net Pin
Jain Mohit9-Mar-04 23:04
Jain Mohit9-Mar-04 23:04 
GeneralRe: using managed class in VC++ .Net Pin
Antti Keskinen10-Mar-04 1:04
Antti Keskinen10-Mar-04 1:04 
There is an article under the name 'Using ADO .Net from MFC Project' that discusses this very same phenomenon. In it, the writer uses the .Net Library from an unmanaged MFC class. Although the sample uses ADO.Net, it is completely valid for all other .Net Library components as well. Even your C# control is a piece of .Net Library. The original article can be found here[^].

To implement your own control, you must compile the C# code so that it generates a DLL file. Then use the #using directive to import this DLL into your unmanaged project. You must also import the .Net Core Library (mscorlib.dll), otherwise strange behaviour might result.

When done, follow the example in the above-mentioned article starting from "__gc pointers in an Unmanaged Class" onwards for an example on how to use your control.

If you need help on creating a C# DLL, follow the guidelines in this[^] article. Then copy the finished DLL into the unmanaged project's search path and continue with the first article's instructions.

Hope this helps you out

-Antti Keskinen

----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
GeneralRe: using managed class in VC++ .Net Pin
Jain Mohit10-Mar-04 1:30
Jain Mohit10-Mar-04 1:30 
GeneralRe: using managed class in VC++ .Net Pin
Antti Keskinen10-Mar-04 10:18
Antti Keskinen10-Mar-04 10:18 
GeneralRe: using managed class in VC++ .Net Pin
Antti Keskinen10-Mar-04 11:48
Antti Keskinen10-Mar-04 11:48 
GeneralRe: using managed class in VC++ .Net Pin
Jain Mohit10-Mar-04 18:35
Jain Mohit10-Mar-04 18:35 
GeneralEM_GETTEXTEX Pin
ckdix9-Mar-04 22:55
sussckdix9-Mar-04 22:55 
GeneralRe: EM_GETTEXTEX Pin
vikramlinux9-Mar-04 23:36
vikramlinux9-Mar-04 23:36 
GeneralWindow Regions Pin
krayakin9-Mar-04 21:47
krayakin9-Mar-04 21:47 
GeneralRe: Window Regions Pin
Prakash Nadar10-Mar-04 3:10
Prakash Nadar10-Mar-04 3:10 
GeneralRe: Window Regions Pin
krayakin10-Mar-04 13:02
krayakin10-Mar-04 13:02 
QuestionI want to post a message to the main frame of singledocument window, how to do? Pin
freehawk9-Mar-04 21:05
freehawk9-Mar-04 21:05 
AnswerRe: I want to post a message to the main frame of singledocument window, how to do? Pin
l a u r e n9-Mar-04 21:37
l a u r e n9-Mar-04 21:37 
GeneralRe: I want to post a message to the main frame of singledocument window, how to do? Pin
freehawk9-Mar-04 21:49
freehawk9-Mar-04 21:49 
GeneralRe: I want to post a message to the main frame of singledocument window, how to do? Pin
Prakash Nadar9-Mar-04 21:57
Prakash Nadar9-Mar-04 21:57 
QuestionHow do I Read Registry Value? Pin
.NetRams9-Mar-04 20:27
.NetRams9-Mar-04 20:27 
AnswerRe: How do I Read Registry Value? Pin
Antti Keskinen9-Mar-04 20:46
Antti Keskinen9-Mar-04 20:46 
AnswerRe: How do I Read Registry Value? Pin
Prakash Nadar9-Mar-04 21:29
Prakash Nadar9-Mar-04 21:29 
GeneralAdapter in promicious mode Pin
Imtiaz Murtaza9-Mar-04 19:20
Imtiaz Murtaza9-Mar-04 19:20 

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.