Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Word Menu in my MDI app

Status
Not open for further replies.

smoothcoder

Programmer
Sep 24, 2002
19
RO
Hi everybody

I have a MDI app with a CHTMLView view derived class. I also have a page with a link to a .doc (MS Word) file. When I click on it my CHTMLView derived view displays the .doc just fine. The problem is that I want the MS Word menu to be merged somehow with my app's menu. Is that possible?? How???

Thanks in advance
 
This functionality involves OLE. It's really hard to go into OLE here, all I can say is just read a lot about it in the MSDN. If you are new to Windows programming or C++ you probably want to put this off for a while. Best of luck to you in this regard.

Will
 
Yeah, I know it involves OLE... but HOW exactly can it be done?? Any ideea?
 
Make your application an Active Document server (step 3 in AppWizard MFC MDI appl.)

It will then be able to launch word "within itself", just like any other Active document server, like for example Visual Studio(ie try opening a .doc file with Visual Studio)
 
Sorry, my bad. Of course I mean Active document container. (still step 3 in AppWizard though)
 
Yes, I've tried it... I load a web page with a link to a .doc file. I click on the link, the .doc appears inside my MDI child frame, the Word rulers are there, but my app's menu is the same... I want MS WORD's menu to be merged with my app's
 
Do you pDocTemplate->SetContainerInfo(...) in the app's InitInstance with an approperiate resource id?

See CDocTemplate::SetContainerInfo
&
Search MSDN on "Menus and Resources (OLE)"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top