
How to add an MFC CWnd to a non-MFC app
Lux,
Several years ago, I was in a project where we did just this on a humongous
application - we wanted to add the OLE-support possible through MFC.
Our approach was to create a skeleton MFC-app, jacking in the old app main
window display code into InitInstance of the new one.
After the initial hassle, which was in no way unsurmountable and quite
localized in scope, the old-style dialogs etc worked well with newly added
MFC-objects. It was actually just a few days of work, including turning the
app into an automation server :-)
Johan Rosengren
Abstrakt Mekanik AB
Quote:
> We have rather large application which for historic reasons uses a
> home-grown cross platform library, which is largely redundant since we
> now support Windows only. The cross-platform part of the app supports
> lowest common denominator type GUI objects- windows, menus, buttons,
> nothing fancy. We would like the capability to insert an MFC CWnd into
> our app so that we could have access to all of the GUI elements that
> MFC supports. I have plenty of experience writing MFC apps, however, I
> have never before done something like this. What are the pertinent
> issues? Can I simply attach a CWnd to one of our windows and expect
> everything to work? We would most likely want to use a CFormView and
> place a bunch of controls on it.
> TIA