Getting Handle to Console Application

S

sharp

I'm a newbie to C# and C++. I have a C# app using windows forms that
call a native dll passes in the window's hwnd and the dll uses
PostMessage to send messages to the C# app. This works great. The
messages are received in the WndProc method.

Now, the probelm is that I want to change the C# app to a Console
application. I have no clue how to get a handle for the Console app
and how to set it up so that it can receive messages from the dll. I
have a feeling I need to use RegisterClass and CreateWindow somehow
but this stuff is a bit confusion to me.

If anyone has any samples I'd be most appreciative.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top