CHtmlView and OnChar
I created an SDI app with CHtmlView as my view class, but cannot recieve
WM_CHAR messages, or any keyboard or mouse messages for that matter. I tried
routing them thru both the View and Main Frame class but it still doesn't
work. Could someone please tell me if there is a way to use these messages
Thanks in advance.
Trap WM_CHAR in PreTranslate method.
This particuler ActiveX control that is hosted in CHTMLView does not work as
you expect with PreTranslateMessage or trapping WM_CHAR etc. There are
couple of ways to do this. One is to automate the control and li...CHtmlView
We have a CHtmlView with two fames in a MFC application.
<frame name="menu" ...>
<frame name="detail" ...>
on the menu frame there are some links.
when you click the link, we use Navigate2() to request a .jsp page and put
it in the detail frame.
I know CHtmlView::GetReadyState()==READYSTATE_COMPLETE means the view is at
I want to know when the detail frame is ready. I tried GetReadyState().
It didn't work. It always return me READYSTATE_COMPLETE ...Painting of CHtmlView !!!
I am showing dialog when clicked on link of HTML page navigated inside
CHtmlView. After closing dialog, the browser( CHtmlView ) does not
paint itself properly. I did everything to solve this problem including
Send Paint message, InvalidateRect, WM_ERASEBKGND, UpdateWindow and
RedrawWindow. But all solutions did not help me. So MFC Gurus, Please
help me to solve this problem of painting of CHtmlView.
...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 ...Problems with CHtmlView
My application uses the CHtmlView control in order to show html pages
and to navigate within different pages. Those pages have internal calls
(using the APP protocol) that the main application processes in order to
show new pages (in the BeforeNavigate2 function).
To show each page, the application writes the html code into a
temporary file and calls the Navigate2 function with the temporary file
The application works correctly but I have two problems that I don't
know how to solve:
function that calls my applicatio...How to force CHtmlView refress()?
I have to use CHtmlView for browsing the html page with dialog.
I have tow dialogs:
First dialogs view the html page with the images, when I click on one
image, this will popup up second dialog(a new dialog) to list details about
I have some processing with the second dialog, when it finished I will close
the dialog and go to first dialog again, before (or also for after) I close
the second dialog I do refresh for with the page on first dialog by calling
m_myHtmlControl.refresh() or also for
But this cause system error.
How...CHtmlView bug ?
I created a simple MDI application, using CHtmlView as the view class. I
guess I found a problem. When I open an Excel file inside the view, I see an
Excel.exe is running, using task manager. But after I close that view, the
Excel.exe is still running until the whole application is closed.
Is there some way to fix the bug ? Or it's not a bug ?
Thanks in advance
I'm looking for a sample using CHtmlView, where the application hosting the
view needs to access the DHTML elements (specifically I'm trying to create
an MRU kind of like VS.NET does). I've found lots of posts from helpful
people saying "just get a pointer to IHTMLDocument2", but I'm too new at
this, I could really use some samples!
Thanks in advance.
Somthing about CHtmlView,
using CHtmlView class as a browser in my application, but doesn't have auto
complete feature for edit controls that appears inside web page like
Would like to enable this feature. As well as how can I enable feature by
You can do that implementing the IDocHostUIHandler interface and its
GetHostInfo method by setting the dwFlags to a value
that contains the DOCHOSTUIFLAG_ENABLE_FORMS_AUTOCOMPLETE flag.
See MSDN Article Q236312, "HOWTO:
Disable the Default Pop-up Menu for CHtmlView&quo...Change Data of CHtmlView
I created a new SDI programme in vc++ 2003, which acts as a little
Additionally I generate HTML dynamically which I want to send to my
The whole html document must be sent, also the head, but I couldn't
find any good solution.
I have found nothing useful in google groups, etc
Do you have a piece of code for me which can help me.
By the way: Where can I dump the whole html-data into a file? ;-)
Thanks a lot!
Maybe this would be useful:
Although I call again Navigate2, why the OnDocumentComplete
was called at the 1st time?
how to set OnDocumentComplete is called for every Navigate2 called?
Hi, how to do the action with code like I press the F5 button to refresh to
<pixelmana> wrote in message
> Hi, how to do the action with code like I press the F5 button to
Try this: start by adding the F5 key to the apps accelerator table, use
the ClassWizard to add a handler for the F5 accelerator command in the
CHtmlView, handle the F5 accelerator command by calling either
CHtmlView::Refresh or CHtmlView::Refresh2.
...How to print a CHtmlView?
How to print a CHtmlView?
Please send a sample code.
Check this link
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
"Renato Tegon Forti" <firstname.lastname@example.org> wrote in message
> How to print a CHtmlView?
> Please send a sample code.
> Thank you.
...CHtmlView zoom in/out images
I am using CHtmlView.Navigate2 to to use the web viewer features inside of my
application. This way I can have a simple viewer.
This it is working but some browser features are not available, for example
I want zoom in/out images.
Directly in browser this works well but when from my application show the
image but it is not possible zoom in/out the image.
It is possible enable these features?
Thanks & Regards,
...CHtmlView and MK_XBUTTON1
I have a working html control and would like to capture mouse clicks.
Implementing OnMouseActivate gives me this information for left and
right clicks. However, the messages for the buttons MK_XBUTTON1 and
MK_XBUTTON2 (from a 5-button mouse) are both given the same message
(523) and I don't know how to distinguish them.
Any ideas? Thank you all.
"Alexander" <email@example.com> ha scritto nel messaggio
>I have a working html control and would like to capture mouse clicks.
> Implementing OnMo...frames and CHtmlView
I managed to get the body of the HTML-Document.
But how can I get the body of the frames if frames exist?
I want to get the content of top.html and re-set it.
Do you have some hints?
Query IWebBrowser2 from the frame element.
"Karsten Jung" <firstname.lastname@example.org> ????
> I managed to get the body of the HTML-Document.
> But how can I get the body of the frames if fr...chtmlview and xml
From withing a CHtmlView
If I navigate to an xml file everything is fine, it reads the xsl file from
within the xml
if I use IPersistStreamInit to read the same xml info from memory it doesn't
use the xsl inside.
is it me that are doing wrong or is it so that I can't use
IPersistStreamInit with xml?
Thanks for your post. I'd like to share the following information with you:
As you know, .xsl is a style sheet which describes how to present an XML
file in browser. When we loading an xml file in CHtmlView, it will not only
parse the xml conten...Events from CHtmlView
If a browser control CHtmlView is embeded in an MFC application, is it
possible for the MFC application to get events (e.g., a button click on the
HTML page) and other form information from the HTML page ?
I am not sure about CHtmlView. But this can be done on CHTMLDialog using
DECLARE_DHTML_EVENT_MAP. Check the Documentation
The other way is a do it the painfull way where you can get the
IHTMLDocument object from the webbrowser and search for the individual
elements and advise for them for all the events you want.
Ashok K Kumar
-----------------...Error or Me in CHtmlView
Okay I don't think I could have possibly done anything wrong...
All I did was use MFC AppWizard to create a CHtmlView program skeleton. I
run the program, and of course it opens smoothly. Yet, whenever I close it,
I get a 0xC0000005 (access violation). I've found the problem in stdcore.cpp
(an uneditable file since it's basically the code for an already compiled
DLL -- I think). So exactly what's the problem? I don't think Microsoft
could have created such a huge flaw. Is it just me?
...CHTMLView and frames
Can sombody please tell me how to prevent the CHtmlView from opening a new
window if the target frame does not exist. (Just open the page as if there
was no target specified)
I'm not really sure what you want here? Is removing the Navigate2 call from
the OnInitialUpdate function in the view what you need?
"Hein Albrecht" <email@example.com> wrote in message
> Can sombody please tell me how to prevent the CHtmlView from opening a new
> window if the target fra...CHTMLView why do you torture me!?
I posted a while back and got no answer. Sorry to repost but I'm just
hoping somebody out there knows the answer and didn't see my question
I want to save the IE browser's output to an image file (probably a DIB). I
have tried but only get things that depend on the view: for example if the
view size is too small so that there are scroll bars and part of the content
is not visible that's what I get in the image file including even the scroll
bars. I don't want that, I want a clean image of the content of the
control, not clipped or including scroll bars, etc.
I ...CHtmlView #3
I want to use CHtmlView in my app to show dynamically created html
content. But I dont need doc/view architecture. I created SDI
application without doc/view support and with ActiveX controls
Then I replaced wizard generated view class with folowing class:
class CMyView : public CHtmlView
virtual void OnInitialUpdate();
BEGIN_MESSAGE_MAP(CMyView , CHtmlView)
in ...Need a Position in CHtmlView
I need to get a position of tag in Chtmlview.
I found 'AbsolutePosition' in CWebBrowser2, but I don't know to use it.
Please help me.
to access an element, take a look at the source code of
"Sohn Jae Hwa" <firstname.lastname@example.org> д���ʼ�
> I need to get a position of tag in Chtmlview.
> I found 'AbsolutePosition' in CWebBrowser2, but I don't know to use it.
> Please help me.
...Searching inside a CHtmlView?
Is there a way to do this? could someone point me to the right
direction otherwise. I don't see any Find methods for this class
Use IWebBrowser2's object model and iterate over all IHTMLElements and
then you can find what you want. I think AliR will provide you with the
Do you want to do the search yourself, or do you want CHtmlView to do it for
This code will bring up the IWebBrowser2 find window.
CString GUID1 = ("ED016940-BD5B-11CF-BA4E-00C04FD70816");
I have a mfc app with CHtmlView.
I am trying to implement a stop button on the frame.
I used CHtmlView::Stop. It works OK for a simple page.
Now I have a page with two frames.
<frame name="menu" ...>
<frame name="detail" ...>
when you click the links on the menu, a request will be sent to a jsp page
to build a report to the detail page.
in this case, CHtmlView::Stop() doesn't work.
My question is how to stop page loading on the detail frame (the second
column of the html page).