Solved

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

Posted on 2001-06-14
5
486 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

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

Suggested Solutions

Title # Comments Views Activity
Delphi XE10, MySQL Query 4 127
Simple Delphi Question 9 83
URL for downloading Google Chrome for Win XP 2 125
Firemonkey DbLookupComboBox equivalent ? 2 38
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

861 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

24 Experts available now in Live!

Get 1:1 Help Now