|
-
July 25th, 2012, 06:30 PM
#1
direct2d in C++ but form in c#
Hi. I have both Visual studio C# and C++ Express editions. I have been experimenting with direct2d. I can create forms in C# but can only write direct2d rendering code in c++. C# naturally lends itself to creating forms easily. But direct2d bindings (unless I am mistaken) are only available in c++. If I make a form in c# with an event handler for the paint scenario, and I write the direct2d renderer in c++, how do I get a handle to the window frame I wrote in c# to c++ so that the renderer in c++ can render to teh window I created in c#?
I guess I should be asking a more fundamental question. What is the orthodox (i.e. pro way) to do this? I have no idea how to do this. Writing the skeleton code (message loop, dispatcher, etc) in c++ is a major pain. Right now I am thinking of sharing a dll, where the dll contains the binaries for the renderer in c++ and the C# app gives a hWnd reference to the dll. Another way is to create a socket between the c++ and c# processes and share the hWnd (but something tells me this is not the orthodox way).
Essentially I know how to make forms in C# and direct2d renderers in c++, but dont know how to take advantage of both put together.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|