Embed MS Word in the Visual C++ Project

Adding the word control to a simple dialog base Application
1. Begin a new MFC AppWizard(exe) dialog base Application.
2. Open The Resources Dialogs.
3. Select the Main Dialog and right click on it.
4. From pop-up menu select “Insert ActiveX Control…”.
5. Select Edraw Viewer Component For Word from the list.
6. Add a member variable to newly created control in the dialog class.
7. This will automatically generate new cpp and .h files which including the information of
edword control.
8. Call the MFC ClassWizard to add the control event message
To resize the control according the form add a new Window Message Handler WM_SIZE and
add the following code in OnSize virtual function
if(!::IsWindow(m_edword.m_hWnd)) return;
m_edword.MoveWindow(0,0,cx,cy);
See VCEDWordDemo c++ example
Upgrade a control in VC++
You can easily upgrade a VC++ project witch is using a EDWord control of a previous version:
1. Register the new version of control using the regsvr32 utility that is located in
windows system directory.
2. From Project menu select Add to Project -> Components and Controls
3. From Components and Control Gallery dialog select the folder Registered ActiveX
Controls
4. Find and select Edraw Viewer Component For Word and click OK to all next dialogs.
5. Rebuild the project.