Solved

IWebBrowser and Printing

Posted on 1997-03-25
2
256 Views
Last Modified: 2013-12-03
Assuming I have managed to embed a WebBrowser control from the ActiveX SDK client window that I have created, how can I instruct it to print its content?
0
Comment
Question by:xen15
  • 2
2 Comments
 

Accepted Solution

by:
lohcheek earned 200 total points
ID: 1334217
Hello,

//the code fragment

LPDISPATCH disp;
IOleCommandTarget* target;

WebBrowser_Object->QueryInterface (IID_IOleCommandTarget,(void **)&target);
target->Exec(NULL,OLECMDID_PRINT,OLECMDEXECOPT_DONTPROMPTUSER,NULL,NULL);

I have assumed that you have already obtained the WebBrowser control pointer (WebBrowser_Object). The details of this can be found in Microsoft's web site on the IE WebBrowser control.
0
 

Expert Comment

by:lohcheek
ID: 1334218
With respect to the above answer, WebBrowser_Object should be the IDispatch instead. Sorry for the mistake.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now