Solved

IWebBrowser and Printing

Posted on 1997-03-25
2
268 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

717 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