Solved

IWebBrowser and Printing

Posted on 1997-03-25
2
259 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
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…

895 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

13 Experts available now in Live!

Get 1:1 Help Now