How to include a Windows Word document in a HWND? - c

I'm looking for including a Word document in a plain-C application. I tried several examples found on the WEB but they are mainly VBA or MFC oriented. Is someone has a link?
My application is made of windows (HWND or, if needed CWnd pointers). One of this window should inherit all the WORD document I want to edit (basically the commands SAVE can be outside). I can not get the correct way to show the WORD document inside my application.
Thanks for your help.

You could embed it using OLE. Take a look at this article for an example of how to do it.

Related

How do you run a VTSO Word project in the same solution as the start-up project during run-time and pass variables to the content controls?

In short I want to pass variables to a vsto project from my windows form project and I don't know how.
I currently have a windows forms project that is near completion with one major piece missing. I have been searching for about two work days for a way to open a VTSO word project in the same solution with a procedure in my windows form project. I know I can code my project to open the word document and my code for default values for the content controls in the "ThisDocument.vb" display correctly. I have added references to my VTSO project to refer to my forms project in an attempt to use variables previously collected to fill in my content controls text, but I have no clue how to do this. Will I have to open the word document and use interops to modify the document separately? I would prefer my answer in VB.Net but if C# is what ya know, I'll take anything to help.

wpf app: help files with search and index

We are adding help files to our WPF application in Visual Studio 2010. We have not been able to find so far a method that we have been able to use.
We have some HTML help files, currently they are just in a directory, not added to the WPF project.
We don't have index or search.
I have seen that maybe we can do something with cmh, but this seems quite old and outdated now.
Ideally we would like all this in WPF, but if its not possible we need another solution.
We would like to be able to hit F1, have our main help page displayed (we have this now, it opens in our browser) and additionally add Index and Search to our main help page.
Can anyone point us in the right direction please?
Maybe you should take a look at the Process.Start Method page on MSDN. In particular, the Process.Start Method (String) page has a code example showing how to open web pages from a WPF application.
To do this inside a WPF application, look at the WebBrowser Class page at MSDN. This also provides a code example of loading a web page into your application.
EDIT >>> After re-reading your post, I realise that I missed the bit about searching and indexing. Surely, you can just search through the web pages yourself? Just open each page and use something like
if (webPageContent.Contains(searchTerm)) return webPageContent;

What control can be used to display txt files as well as pfd and .doc

I'm relatively new to windows forms programming and was looking for a control that could be used to display both .txt, pdf, and doc files. When I first started googling for a solution I was led to the possibility of using the wpf xps control, but I would have to figure out how to integrate that within a win form app and still wasn't clear as to whether it would solve all my problems. Any guidance on this will be greatly appreciated.
Thank you!
In general, I wouldn't do that (try to find a single control that can do everything). Instead I'd think about creating different controls for different types of content and toggling the visible state on the control depending on what content you're displaying.

Is there any way of getting a XAML Editor, either build or download?

In my current project (presentation, slide software) I need to be able to make some simple XAML, text images, movies and stuff like that.
If it were HTML I would go with fckeditor or another free editor, but what to do in XAML?
Anyone know if its possible to make one yourself (like executecommand to a IE)? or download one from anywhre on the net?
Cheers
Take a look at this question: Designing WPF Windows for Free?
The leading answer recommends Kaxaml, XAMLpad and several more options.

Page preferences dialog in WPF

I'm fiddling with adding the ability to output from a program I'm working on to both PDF and XPS. Initially both were just done via printers (pdf printer/xps writer) but I'd like to do it a little more directly.
The issue I've run into is that there doesn't seem to be a page preferences dialog for WPF. Is there one and I just can't find it, or does something like this have to be custom built in WPF?
I can display the print dialog and then just not actually call PrintDialog.Print, but that's not really any better than just having the user print using a PDF printer. I can retrieve all the page settings from the print dialog, but the user would actually be setting those settings for whichever printer was currently selected.
I just need a dialog with all the standard printer preference options, like page size, margins, copies, etc. Not difficult to create, but I'm surprised I can't find one...
My answer to this question should help you. What are the chances... I just answered it, and I stumble across your question :)
Hope this helps you!!

Resources