开发者

How can I host a c# control in a win32 app?

I've developed a c# control, and I can 开发者_如何学编程reuse this in other c# apps and that works really well.

However I want to host this control in a Win32 c++ app, is there a way to do this?

I was wondering if it would work with managed c++, however I can't quite figure out if this is possible.

Any help would be gratefully received.

Cheers Rich


You can use the Com Interop Toolkit to solve this.

This is how I do it: I create my control in C# When I want to expose this control to another Win32 app, I expose this control via com. I create a new project using this com interop toolkit, create a new control, and put my C# version of my usercontrol on this new control.
Then, you should have a com-exposable version of that control. At least, that's in short how i do it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜