CHTMLView help needed

I have a CHTMLView and I want to save the output from it as a bitmap (or
some other image type) file.

Does anyone know how to render the content of the view to an image file
(IE5.5 and up)?

The normal standard Windows GDI based approach doesn't seem to work because
it only gets the area of the view that is visible and includes the view's
scroll bars in the output.  Is there away to get cleaner output rendered to
an impage file that doesn't have the scroll bars and shows the whole
content, not just what is currently visible onscreen?
----------------------------
I know one of you really smart people out there knows how to do this.  You
are torn between wanting to help and show off what you know and between your
real job.  Come on... how many nights have you stayed late fixing a bug and
nobody knew how hard it was or even appreciated it.  How many times did your
boss give you a crappy raise, or put some idiot in charge of you?  How many
times did they bring you a half-baked design that cost 90% of the total
budget and then demanded to know later why the engineering stage was going
so poorly?  Here's your chance to get them back by dropping that and showing
me how to do this!  Unlike your boss I'll say thank you and really
appreciate it!!!


0
river.ross (102)
9/22/2003 4:01:17 PM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
931 Views

Similar Articles

[PageSpeed] 48

Come on I know this has to be possible somehow?  Nobody's done this before?


"River Ross" <river.ross@sbcglobal.net> wrote in message
news:h1Fbb.1497$rn.1009@newssvr23.news.prodigy.com...
> I have a CHTMLView and I want to save the output from it as a bitmap (or
> some other image type) file.
>
> Does anyone know how to render the content of the view to an image file
> (IE5.5 and up)?
>
> The normal standard Windows GDI based approach doesn't seem to work
because
> it only gets the area of the view that is visible and includes the view's
> scroll bars in the output.  Is there away to get cleaner output rendered
to
> an impage file that doesn't have the scroll bars and shows the whole
> content, not just what is currently visible onscreen?
> ----------------------------
> I know one of you really smart people out there knows how to do this.  You
> are torn between wanting to help and show off what you know and between
your
> real job.  Come on... how many nights have you stayed late fixing a bug
and
> nobody knew how hard it was or even appreciated it.  How many times did
your
> boss give you a crappy raise, or put some idiot in charge of you?  How
many
> times did they bring you a half-baked design that cost 90% of the total
> budget and then demanded to know later why the engineering stage was going
> so poorly?  Here's your chance to get them back by dropping that and
showing
> me how to do this!  Unlike your boss I'll say thank you and really
> appreciate it!!!
>
>


0
river.ross (102)
9/22/2003 5:03:11 PM
Hi,


Not smart to respond to your own initial posting if you really want a
response. I for one normally don't even look at questions that seem to have
responses already. I guess me isn't the only one.

The web browser control that is used as the underlying technology for
CHtmlView has the possibility to print to a bitmap. The word print here you
should really interpret as printing to pages, with all the settings that are
normally involved for that, like page sizes and orientation and such. (But
without the scroll bars and stuff that is nagging you now.)

This article describes a lot of promising printing stuff of the web browser
control:
http://msdn.microsoft.com/library/en-us/dnie55/html/wb_print.asp

What you might be looking for is called "Printing a Bitmap of a Web Page"
under "Printing Workarounds".

My personal experience with the whole printing stuff for the web browser
control is that it is rather difficult to set up and get to work. I stopped
exploring the bitmap printing solution at some point altogether, as there
was a much better solution for what I was trying to do at that time. But
also other approaches from that document that I needed to use seemed rather
unclear to me. Even now I've successfully implemented them :-S

Good luck,


Sander Verhagen
[   Verhagen@nonono.Sander.com   ]

"River Ross" <river.ross@sbcglobal.net> wrote in message
news:h1Fbb.1497$rn.1009@newssvr23.news.prodigy.com...
> I have a CHTMLView and I want to save the output from it as a bitmap (or
> some other image type) file.
>
> Does anyone know how to render the content of the view to an image file
> (IE5.5 and up)?
>
> The normal standard Windows GDI based approach doesn't seem to work
because
> it only gets the area of the view that is visible and includes the view's
> scroll bars in the output.  Is there away to get cleaner output rendered
to
> an impage file that doesn't have the scroll bars and shows the whole
> content, not just what is currently visible onscreen?



0
Verhagen (48)
9/24/2003 9:43:59 AM
Thanks for your response, its greatly appreciated and you are right about
posting to myself... I was just trying to egg somebody into giving an
answer, I was so frustrated that day.

I am already familiar with the article you discussed and had already
reviewed even prior to this current issue because I ussed IE to print in an
app and due to those known issues with the printing we finally made the call
to switch from IE based html reporting to Crystal Reports.

But that article does have a sample that tells how to take a bitmap of IE
which I had downloaded and tried.  First off if you have VC6 you have to
update your SDK because newer IE features aren't in the mshtml.h that
shipped with VC6 so that hung me up for a while.  But the sample has no
documentation that's thorough enough and even hints at certain limitations
without saying anything concrete (I believe it says users would have to
position the screen size etc before using this) which is really
disappointing.  When IE prints itself it does not need to maximize itself so
that it is visible etc so this is a really a sad example.

I know IE is a fancy complicated Com object and all that but still if MS is
embedding it in an MFC class and proposing it as a widget that developers
can use it would really be nice of them to give that some deeper thought and
actually support it in that capacity.

The IE browser control seems to be one of the most mysterious topics on this
board.  Over and over people post questions and typically nobody knows the
answer.  That's because it really has so little to do with MFC and totally
the arbitrary implementation of that com object which nobody has time to
decipher and which is too deep to apparently get simple answers.

I mean the fact that I can't programmatically call certain operations
without a dlg flashing in the users face due to security concerns shows that
little effort has gone into making it a decent widget... the control can't
even distinguish between client side scripting (where certain operations
would be restricted so that a web site couldn't run malicious code on you
machine) and when its embedded into a user's application where it should be
allowed to complete any operation.

I think this is really sad because underneath it all its the premier browser
out there.  Its really exciting that MS gave us the keys to this car and is
letting us take it for a spin our own apps.  Unfortunately its just not
being well supported in this capacity in my opinion.

I wish I could find a good CHTMLView faq or something.



"Sander Verhagen" <Verhagen@nonono.Sander.com> wrote in message
news:O8yviBogDHA.2184@TK2MSFTNGP10.phx.gbl...
> Hi,
>
>
> Not smart to respond to your own initial posting if you really want a
> response. I for one normally don't even look at questions that seem to
have
> responses already. I guess me isn't the only one.
>
> The web browser control that is used as the underlying technology for
> CHtmlView has the possibility to print to a bitmap. The word print here
you
> should really interpret as printing to pages, with all the settings that
are
> normally involved for that, like page sizes and orientation and such. (But
> without the scroll bars and stuff that is nagging you now.)
>
> This article describes a lot of promising printing stuff of the web
browser
> control:
> http://msdn.microsoft.com/library/en-us/dnie55/html/wb_print.asp
>
> What you might be looking for is called "Printing a Bitmap of a Web Page"
> under "Printing Workarounds".
>
> My personal experience with the whole printing stuff for the web browser
> control is that it is rather difficult to set up and get to work. I
stopped
> exploring the bitmap printing solution at some point altogether, as there
> was a much better solution for what I was trying to do at that time. But
> also other approaches from that document that I needed to use seemed
rather
> unclear to me. Even now I've successfully implemented them :-S
>
> Good luck,
>
>
> Sander Verhagen
> [   Verhagen@nonono.Sander.com   ]
>
> "River Ross" <river.ross@sbcglobal.net> wrote in message
> news:h1Fbb.1497$rn.1009@newssvr23.news.prodigy.com...
> > I have a CHTMLView and I want to save the output from it as a bitmap (or
> > some other image type) file.
> >
> > Does anyone know how to render the content of the view to an image file
> > (IE5.5 and up)?
> >
> > The normal standard Windows GDI based approach doesn't seem to work
> because
> > it only gets the area of the view that is visible and includes the
view's
> > scroll bars in the output.  Is there away to get cleaner output rendered
> to
> > an impage file that doesn't have the scroll bars and shows the whole
> > content, not just what is currently visible onscreen?
>
>
>


0
river.ross (102)
9/25/2003 5:29:00 PM
Reply:

Similar Artilces:

Data Validation Help Needed urgently !!!!!!!!!!!
I am trying to write a data validation in VBA. I know I have the code right but I can't get it to work. It works fine if the validation was done dirctly in excel but I get an error when I try the same thing in VBA. Below is a snippet of the code I am having a problem with. The problem seem to be with the " Formula1:=" line. I have been scratching my head for the past 24hrs now trying to figure this out and I am still not coming up with anything. Any help will be greatly appreciated. Range("B3:C3").Select With Selection.Validation .Delete .Add Type...

Help with Calling a Module within a Module
Simple problem, but I'm confused, I'm trying to call a module "TextToData" within the following code, but its coming up with a compile error. My code (I thought would work) is. Info on how to fix would be great (I know the individual parts work) Sub GenerateReport() Sheets("Sales Mix").Select Cells.Select Selection.ClearContents Range("A1").Select Selection.QueryTable.Refresh BackgroundQuery:=False Range("A1").Select Application.ScreenUpdating = False With Application .Calculation = xlManual .Max...

documents issued in one version need to be updated in another
Can we open a document issued in version 2003 if we have 2007 installed? The document would be emailed to me by another office and I need to be able to open it and work in it. YES John G. "Becky Freedman" <Becky Freedman@discussions.microsoft.com> wrote in message news:A839A4C9-41EA-4FBF-94AF-6974E061D771@microsoft.com... > Can we open a document issued in version 2003 if we have 2007 installed? > The > document would be emailed to me by another office and I need to be able to > open it and work in it. ...

Help with Excel 2007
I am using Excel 2007. Each time I Close Excel I get an error box (Microsoft Office Excel has encountered a problem and needs to close. We are sorry for the inconvenience) and if I don't un-check "restart microsof office" it will restart Excel. What can this problem be? Hi Rick Start Excel Office button > Excel options Click on Resources And run Microsoft Office Diagnostics -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Rick Price" <jayg359@gmail.com> wrote in message news:xnLli.48661$mZ7.14728@fe01.news.easynews.com... >I am using Exc...

Help-Error validating multiple documents
Hello. I've got a total of 5 schemas. They are: 1 - 1.xsd - a description of a city 2 - 2.xsd - a description of a town 3 - CityHall.xsd - a description of a cityhall-meant to be part of a document based on 1.xsd in "user area". 4 - TownHall.xsd - a description of a townhall-meant to be part of a document based on 2.xsd in "user area". 5 - testmultischema.xsd - a document which combines in a batch instances of cities and towns based upon 1.xsd and 2.xsd. I get the following xml validation error: ERROR: The 'http://adamExt.org:TownHall' element is not declar...

Help with Message Filtering & BCC
I'm sorry if my orginal post wasn't clear enough, so I'll try to elaborate. A.adds cc or bcc automatic settings options I would like to set up a bcc to an email address that automatically does so when I send a message. With Outlook 07, I have to do it manually each time. Whereas with Thunderbird, you can preselect whom you want to bcc messages to. Each time you send a message it does it automatically. B. manages the message filter options something like Mozilla Thunderbird I'm having a real problem managing my message filters using Outlook. I have many folders representing ...

INTEGRATION MGR HELP
I am using Great Plains 7.5 and Integration Manager 7.5. I have created a new integration for revenue and have added a source from an AS/400 file. I have added the General Journal as the destination and have mapped the destination fields that I need. I saved it and ran it and keep coming up with this error: Message DOC 1 ERROR: You must provide a message. Source Ln 317 Col 2, Update module, Last CBOM field read was root.'Note', Last window field visited was 'OK Button' of window Can someone please tell me what I need to do to get past this. thanks so much You hv...

Arrgh!..Need OW Help Please
Let me preface by saying I am using this document http://www.msexchange.org/tutorials/OWA_Exchange_Server_2003.html as a guide. I have not configured any SSL options yet because I can't get it to work. Trying to build Exchange 2003 Frontend/backend on my LAN. Front end is W2k3 SP1\Exchange 2003 SP1 and Backend is W2k3 SP1\Exchange 2003 (no SP1). After installing Exchange on the 2nd server (to be the new Front-end), I am able to create a mailbox in it's own store and access it via OWA from a Win2000 Pro workstation. This mailbox resides on the 2nd server's own store. I then en...

Urgent help: change outlook default conatct form
Hi all, We added several fields to contacts in the standard form (design mode). We want this form to become users' default conatct form. Also, old contacts are able to launch from this new customized form. are these possible? exchange 2003/outllokk2003/outlook 2007) Yes. This is possible. You need to change the form on the folder properties and then run a program to change the IPM form used on existing items. See the last two sections at http://www.outlook-tips.net/beginner/publish_form.htm for details and link to the program. -- Diane Poremsky [MVP - Outlook] ...

Help. Wrong home mta for all users
Gang, using adsiedit I have found that all of my users have the incorrect home mta: It looks like this: CN=Microsoft MTA\ DEL:fa6b4c63-7cdb-43c0-aa14-fb19c4e855b5,CN=Deleted Objects,CN=Configuration,DC=Health,DC=org Is there a way that I can change this for all users at once? Script/csv/ldf/admodify.net -- Bharat Suneja MVP - Exchange www.zenprise.com NEW blog location: www.exchangepedia.com/blog ---------------------------------------------- <troute_kilgore@yahoo.com> wrote in message news:1169148159.997905.48020@m58g2000cwm.googlegroups.com... > Gang, using adsiedit I have...

SMTP queuing help
Hi all, I have an exchange 2000 server on domain1. I am running exchange 2003 on a totally unrelated domain2. I would like to configure domain2 as a backup for domain1. What I mean by backup is just a place for the mail for to be queued up incase the Internet goes down for domain1. Users do not need access to it. Can anyone point me in the right direction? Thanks! -LT Hello Luniz, Thanks for your posting here. You may use the one of the following options to download messages from the backup server. Option 1: Configure SMTP connector with ETRN/TURN enabled ========== To use this m...

help on conditional
Here is what I have, =SUM(IF(Sheet1!D9="JF",Sheet1!E9,0)+IF(Sheet1!D10="JF",Sheet1!E10,0)+IF(Sheet1!D11="JF",Sheet1!E11,0)+IF(Sheet1!D12="JF",Sheet1!E12,0)+IF(Sheet1!D13="JF",Sheet1!E13,0)+IF(Sheet1!D14="JF",Sheet1!E14,0)+IF(Sheet1!D15="JF",Sheet1!E15,0)+IF(Sheet1!D16="JF",Sheet1!E16,0)*IF(Sheet1!D17="JF",Sheet1!E17,0)+IF(Sheet1!D18="JF",Sheet1!E18,0)+IF(Sheet1!D19="JF",Sheet1!E19,0)+IF(Sheet1!D20="JF",Sheet1!E20,0)+IF(Sheet1!D21="JF",Sheet1!E21,0)+IF(Sheet1!D22=&q...

Help with If and Then statement
I have a form based on a query which is itself based on 2 tables tbllevy and tblindividual. The form has a control, txtpaidbybusiness, whose control source is a YES/NO field in tbllevy with the same name. The form has another control whose source is txtbusinessname in tbllevy. If txtpaidbybusiness is YES I want to populate the control txtbusinessname with the value of the field with the same name from tblindividual. The two tables are linked in the query by txtmemnumber.tblindividual and txtmemnbr.tbllevy Can someone help with the If Then statement I need to put in the AfterUpdate event...

Can someone help me??? (0/1)
Let me start off by saying that I am no where near an excel expert so please bear with me. I have a schedule for my employees which is attatched to this post as an html file. They are contained in three different sheets within a workbook. Each sheet has its own formulas and such but I have excluded them and also condensed them down to save repitition. The 3 scheduling sheets are named Servers, Hostess, and BarBus I also have/want 7 other sheets named Mon thru Sun and a template is attatched as an html file as well. What I need to get working is the Mon thru Sun sheets to automatically pu...

Need helps about importing and etc.
I'm a newbie, where can i find information about RMS Setup and Deployment Overview, Installation Requirements, Terminology, Upgrading, Configuration, Import/Export, Limitations, and so on? thanks, Jay K Partner Source http://www.microsoft.com/BusinessSolutions/partnersource.mspx -- Mobitech Lady Amy Luby Mobitech 402.330.0707 www.mobitechonline.com "JayK" <JayK@discussions.microsoft.com> wrote in message news:3AD41CE8-6B86-45A0-A2EA-A61A91CFB482@microsoft.com... > I'm a newbie, where can i find information about RMS Setup and Deployment > Overview, Instal...

wmp usage rights and virus's please help!!
Please help I am not very technical but have managed in the past to download tv shows and watch them using vuze and wmp. However now when i try and watch anything, I get a box open up and it says that I have to download media usage rights aquisition. When ever I click on start and download this it just gives me loads of malware and virus's. Mirar, virtumonde and win32.agent. How can I watch these programmes that I have downloaded without getting these. Fortunately spybot sorts them out for me, but I would dearly love to just be able to watch stuff that I have downloaded, a...

Dont force a Blank Page if Field is Null !!!!!! Please Help
Hello again, Asking for some expert advise. I have a report that has two sections both with headers and footers. in the final footer I have a unbound field that if the check box is true show the field, if false, Null. it wiorks great, but here is my problem. that footer need to pring on the second page and it will if I "Force New Page" but if it is null it gives me a Blank page. I tried the grouping and Page Breaks and Footer Properties but they all seem to do the same thing or it doesnt. Please help!!!! -- -The Novice Learn Today, Teach Tomorrow Great Success is one...

Table Help
Hello Everyone, I know I have seen this problem before and that I have corrected it in the past, but for some reason I can't figure it out this time or find something similar online. The problem is simply, when I view a certain table one of its columns is completely filled in with "##########". The data is still there because when I click on it the data appears, and the data is visible in a justified form. It can't stay like this but I can't figure how I did it in the first place or how to change it back. Any help would be greatly appreciated. Thank You Ko...

Serialization Help Required
Hello All I have a mfc dll that has a serialied class derived from CObject. like class CMyBaseObject: pulbic CObject { DECLARE_SERIAL(CMyBaseObject); ..... }; I have another mfc dll that i link statically to the first dll. This dll has another serialized class derived from CMyBaseObject. like class CMyDerived: pulbic CMyBaseObject { DECLARE_SERIAL(CMyDerived); ..... }; but on building this dll i get linker errors stating unresolved external symols. can anyone tell how can i use one serialized class in antohter dll to avoid linker problems? thanks hi i think, u have not set the dl...

Creating help
I wonder how to create help for my project? I've found an .rtf file in the hlp folder of my VC++ 6 project that seems to be the ground for the help. Are you supposed to edit this file somehow? How do you create different pages with links between them in the help? You do it it with a great deal of difficulty in my opinion. What you need is Help Workshop (HCW.EXE) which you already have or you can download from MS with which you edit contents files and compile/test the help. You need MS Word to edit the .rtf files. VS gives you a starter file (AfxCore.rtf) which you modify. You have...

Need to change pic viewer in Excel
When I was running XP Home I could open a link to a picture in Windows FAX viewer. But in running XP Pro the picture opens in IE which causes multiple browser windows to close if viewing several linked pictures. This is an Excel newsgroup. You should post your question to a WindowsXP Pro newsgroup. HTH Otto "rgroff" <rgroff@discussions.microsoft.com> wrote in message news:46469ECB-F3B4-4F33-9FAC-8496239F14C2@microsoft.com... > When I was running XP Home I could open a link to a picture in Windows FAX > viewer. But in running XP Pro the picture opens in IE which...

Urgent Help VBA
Hello, I need ASAP to transform this function into a VBA macro to finish an existing VBA Macro =INDEX([VBPA.xls]Sheet1!$D$1:$D$50000, MATCH(1,(INT(D3)=[VBPA.xls]Sheet1!$A$1:$A$50000)*("BP"=[VBPA.xls]Sheet1!$C$1:$C$50000),0)) -- Regards, Jeff Hello, A function is different than a procedure, they are not the same, and that is what you asked for. If you want to know how to *use* the function using VBA, well, why don't you use it just the way it is, using the Evaluate method? Evaluate("=INDEX([VBPA.xls]Sheet1!$D$1:$D$50000,MATCH(1,(INT(D3)=[VBPA.xls]Sheet1!$A$1:$A$...

Outlook Macro
I need to set a large number of Outlook calendar entires to: Show Time as: Free, and Sensitivity: Private I am having difficulty working out how to write a macro to do this. can anyone help please? Thanks V ...

PLEASE HELP => MSCRMFaxRouterService
I got a huge proglem with CRM 3.0 => I keep getting this error-message in the application event logs: Microsoft.Crm.Tools.FaxConnectorService.FaxSinkServiceException: Failed to initialize the fax analysis module for folder: [CRMServerUrl:'http://MASTER:5555' Folder:' C:\Programme\Microsoft CRM\Server\bin\fax\incoming'] (Microsoft.Crm.Tools.FaxConnectorService.FaxSinkServiceException: Failed to load users for fax recognition purposes for folder: [CRMServerUrl:'http://MASTER:5555' Folder:' C:\Programme\Microsoft CRM\Server\bin\fax\incoming'] (System....

Visual basic error after installing add-in....is it Microsoft problem or 3rd party. Please help.
After I installed a 3rd party add-in I got the following error (besides not only 2 of the 4 add-ins being installed) excel microsoft visual basic error &H80004005 (-2147467259) Unspecified error Is there a fix for this or is this a matter for the company selling the add-in? Thanks in advance, sheana Care to share the name of the third-party add-in? What does "besides not only 2 of the 4 add-ins being installed" mean? Gord Dibben MS Excel MVP On Mon, 2 Feb 2009 14:56:37 -0500, "sheana" <sheana@discussions.microsoft.com> wrote: >After I installed...