mfc >> 2 further: capture Event from MS Web browser (shdocvw.dll) 2

by SmF5Q2hhZGRlcndhbGE » Fri, 04 Feb 2005 13:29:01 GMT

Hi all,


Thanks for your guidence...

>Another way, as shown by Paul Dilaschia might work for you. He
>discussed it few years ago in MSDN:

>http://msdn.microsoft.com/msdnmag/issues/01/09/c/default.aspx

>He simply subclasses the IE window and traps some messages. I suspect
>it will do what you are looking for.

I have looked that example it was something i was looking for... But
.... My primary concern is to display MS Office documents and PDF
document. I have tried to load such documents And they were loaded but
was getting crashed In d'tor.... ?

Another thing that also teasing me. that is i have looked another
article in msdn titled "Loading HTML content from a Stream " .... i
also have document data ( .doc,.xls,.ppt,.pdf) in CHAR* then i am
trying to convert it into HGLOBAL and with trying to display data with
help of IPersistanceStreamInit() & Load() ... It works fine For HTML
stream.. as shown in above article..... But when i tried to load .doc
(and other) it shows their binary form (with junk header)

Can u tell me why is it so?
How can i display such streams same way as IE does?
Do i have to use anther interface other then idispath
/ipersistence....?


>There are couple of ways to do it. One is to use IE/IWebBrowser2's
>object model. This is what you have mentioned and requires using COM.
>---------
>Ajay Kalra
> XXXX@XXXXX.COM

How to go further in above method as this can give me some com
knowledge...


Once again thanks for yr guidence.

Jetli



>Jay Chadderwala wrote:
> Hi all,
>
>
> I am new to ole/com. I have dialog based application in which i have
> inserted shdocvw.dll activex component. I can load html,doc,and other
> documents. via
>
> m_shBrowser.Navigate((LPCTSTR)m_sPathUrl , &vtEmpty, &vtEmpty,
> &vtEmpty, &vtEmpty);
>
> It loads succesfully. ( if i open .doc file then winword.exe is loaded
> in task manager. ?)
>
> Now I want to caputure LBUTTONDOWN,RBUTTONDOWN, MOUSEMOVE message....
>
> I have tried with message map macros .... IT Works when there is no
> document loaded. But when i load/open any document then I am not able
> to get any of above message. i have tried with DefWindowProc() handler
> also but with no luck.
>
> I have searched on net but havent found reason WHY?
>
> and also not found how to do above.
>
> Can anyone guide me how to capture above and such messages?
>
> i dont want to display mouse when it is on the browser control.... and
> also not want to generate default menu.. instead display my menu....
> can anyone point how can i implement?
>
> do i have to create ole eventsink? if so then how?
>
>
> Thank in advance


Similar Threads

1. Want to capture Event from MS Web browser (shdocvw.dll)

2. Second: Want to capture Event from MS Web browser (shdocvw.dll) 2

3. Web Browser Control shdocvw.dll - CSharp/C#

4. Capturing Button click event in a Browser Helper Object

Hi,
 I have added a button to the standard toolbar in Internet Explorer.I
have a Browser Helper Object(Basically gets the source code of the web
page) that works fine everytime web page gets loaded. From this BHO, i
want to capture the button click event and take appropriate action.How
to do this? Does some method exist already in this regard? Somebody pls
help me..

With Regards,
Sujoan.

5. MS Web Browser from HTML string - CSharp/C#

6. how to get pure html without javascript from ms web browser control

WebBrowser runs off IE, so it would probably depend on the main internet
settings of the computer it was running on whether javascript is enabled or
not.

"zjz" < XXXX@XXXXX.COM > wrote in message
news:%238h2$% XXXX@XXXXX.COM ...
> Hello,
>
> I used web browser control in my program. but I found that if html
includes
> javascript, ihtmldocument object still has this scripte, not pure html.
does
> anybody know how to get the pure html (script has been interpreted)?
>
> Thanks in advance!
>
>
>


7. MS Web Browser Control Zoom problem.

8. shdocVw Browser toolbar set cookie

I am writing a browser toolstrip bar that sits in IE.  How do I set a cookie 
in the browser for a specific domain before the user navigates to that domain.
I only have access to IE as an SHDocVw.WebBroswerClass
I am trying to set the cookie using 

mshtml.HtmlDocument.cookie="name=value;domain=.example.com";

but when I try listening for BeforeNavigate2 event on the browser, the 
document field in ShDocVw.IWebBrowser2 is an HTMLDocument in the wrong 
domain, so the cookie doesn't get set and is not inlcuded in the request to 
the server, and I get an error for not having the cookie.

How have other people gotten around this problem with the shDocVw and mshtml 
packages?