Solved

C++Builder 5.01 : TCppWebBrowser: - printing no header & footer

Posted on 2001-06-14
5
489 Views
Last Modified: 2010-04-06
I know this is the wromg group but there are no experts answering C++Builder question in the C++ forum.

I am using TCppWebBrowser o print a htnl document in C++Builder 5.01.

How can I stop the header (dopcument title and page #) and footers (filename abd date) being printed?

Thanks, Tom.
0
Comment
Question by:tomcorcoran
  • 3
  • 2
5 Comments
 
LVL 2

Expert Comment

by:RickHalle
ID: 6193241
Here's the documentation for it. I do not do C++ builder but I think these links are what you are looking for. I think they are used like this:

ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER, pvaIn, NULL);

If pvaIn is a VARIANT of type VT_BSTR, pvaIn specifies the path to a custom print template.

IDM_PRINT Command ID:
http://msdn.microsoft.com/workshop/browser/mshtml/reference/constants/IDM_PRINT.asp

TEMPLATEPRINTER Element:
http://msdn.microsoft.com/workshop/browser/hosting/printpreview/reference/behaviors/TemplatePrinter.asp

Rick
0
 
LVL 2

Accepted Solution

by:
RickHalle earned 75 total points
ID: 6193983
0
 

Author Comment

by:tomcorcoran
ID: 6201302
Rick,

Thanks so much, I had little - I was using ExecWB to print. I am not so sure how to deal with the IDM_PRINT commands and templates and if I can access is from C++Builder. SHDocVw.dll is wrapped which is how I can access ExecWB, but I am not sure about the rest.

From the article
http://support.microsoft.com/support/kb/articles/q236/7/77.asp
I can access the registry to temporarily alter the header Page infromation and the footer date. Perfect. That just leaves the additional footer filename info, I'm trying to figure how to get at that.

Thanks so much, Tom.
0
 

Author Comment

by:tomcorcoran
ID: 6201359
Rich,

What can I say, superb :-) Temporarily altering the registry setting for footer and header wiped everything including the html title in the header and file name in the footer. Which is exactly what I wanted in a few lines of code. Thanks again, you have really helped me out.

Cheers, Tom.
0
 
LVL 2

Expert Comment

by:RickHalle
ID: 6201721
FWIW I couldn't get the Template to work in Delphi either.

Rick
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

770 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