Create a ActiveX with a MFC existing application
I'm trying to convert my MFC application, a simple "PaintBrush" app that draws lines and rectangles (it's only a little test from another bigger application), to a ActiveX Control that a could embe开发者_JS百科d into a Windows Forms Application (with Visual C#).
I didn't found any tutorial for do this, and now, I'm not sure that this it's possible.
I know how create an ActiveX Control recently created but not how convert an existing application.
Have anybody know how I can do this?
Thanks!
Even though your part of the code often remains similar, the framework part of the code changes enough for a control vs. application that I doubt it's very reasonable to try to migrate the current project.
Rather, I'd build a new ActiveX control, and paste pieces from your current application into appropriate places in the new control -- for example, taking the code from your view's OnDraw, and pasting it into the OnDraw for the control project.
精彩评论