Questions tagged [iwebbrowser2]
178 questions
3
votes
2 answers
IWebBrowser2 Ctrl + C and other shortcuts support
It seems I've got not a trivial problem.
I hook my own window into IE main window. My window is derived from WTL's CWindowImpl and hosts IWebBrowers2 control, which shows some content.
IWebBrowser2 shows html with editbox where…

nicolausYes
- 633
- 8
- 33
3
votes
1 answer
IWebBrowser2 Quit method fails with a E_FAIL result
I am hosting the web browser control in my own window. Here are the pertinent steps:
CoGetClassObject(CLSID_WebBrowser,
CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER,
NULL, IID_IClassFactory, (void…

Subhash Bhardwaj
- 93
- 1
- 6
3
votes
1 answer
How do I listen the event of Running IE with IWebBrowser2 in C++ XE2?
Currently I want to automate the running IE. I have successfully attached the running IE using below code (I assume there is only one IE within one tab)
#include "atl/atlbase.h"
#include
#include
CComQIPtr pCurIE;…

Willy
- 1,828
- 16
- 41
2
votes
1 answer
Printing to a specific printer using the IE control without changing the default printer
Is there a way for me to pass a PrintDlg structure (or something similar) to my WebBrowser (Internet Explorer / IWebBrowser2) control such that it will print to the printer specified in the PrintDlg without popping up a print dialog? I want to do…

B.J.
- 21
- 2
2
votes
1 answer
How do I set a background colour for IWebBrowser2 whilst page is loading?
The title says it all really...
I'm using IWebBrowser2 to display web pages in my application, however, when I call IWebBrowser2::Navigate() a white background is displayed whilst the target page is loading, which conflicts with the colour scheme of…

j b
- 5,147
- 5
- 41
- 60
2
votes
1 answer
Is there any way to pass cookie to IWebBrowser2 navigate
Is there any way to pass cookie to IWebBrowser's Navigate method.
As far as I can see neither passing Cookie header in headers nor InternetSetCookie/InternetSetCookieEx works with IE11.
The only working method I found is to set cookie via put_cookie…

elevener
- 1,097
- 7
- 20
2
votes
3 answers
How to pass WM_KEYDOWN message to IWebBrowser2 instance?
I'm loading an embedded browser within a parent application using the IWebBrowser2 interface. My code is compiled as a dll, i.e. the browser component is dynamically loaded at runtime via a plugin interface.
The problem I'm having is that…

j b
- 5,147
- 5
- 41
- 60
2
votes
3 answers
Overriding window.location on Webbrowser Control
This might seem a weird question, but is there a way to override the window.location without making the browser control navigate to it? The problem I am having is that i am injecting html code in the control, and the window.location is about:blank -…

timeitquery
- 251
- 1
- 5
- 14
2
votes
2 answers
Returning string to JavaScript from C++ function
I have a class (JSObject) that implements the IDispatch interface. The class is exposed to JavaScript running in my hosted web browser control (IWebBrowser2).
See more here about how this works: Calling C++ function from JavaScript script running in…

Tobbe
- 3,282
- 6
- 41
- 53
2
votes
2 answers
IWebBrowser2 and multithreaded apartment?
I am developing a Windows app with WebBrowser control (IWebBrowser2) embedded.
Things look good if I initialize COM apartment as single threaded:
CoInitialize(NULL);
However, if I change it to be multithreaded:
CoInitializeEx(NULL,…

TopQ
- 175
- 3
- 13
2
votes
1 answer
IWebBrowser2 interfaces dependency graph
Is there interfaces dependency graph for IWebBrowser2 component?
I just want to make it clear what kind of dependencies exist between interfaces and who calls who?

C0x
- 105
- 12
2
votes
1 answer
HTTP response header from IWebBrowser2
Very similar to this question, I am trying to get a specific value in the response header. It references a pass-through solution using Asynchronous Pluggable Protocol (APP) handlers, however the links are dead since the solution is quite…

Jeff
- 2,495
- 18
- 38
2
votes
0 answers
How can I get an IWebBrowser2 reference to the Internet Explorer window opened by clicking on a link?
Suppose I open a new Internet Explorer window by, for example, clicking a link with target="_blank" in the HTML link. Further suppose I'm doing so programmatically via COM. I realize I can attach to the DWebBrowserEvents2::NewWindow3 event, and be…

JimEvans
- 27,201
- 7
- 83
- 108
2
votes
1 answer
Disable script debugging in IWebBrowser2 OLE control? C++
I have a IWebBrowser2 I use to visit some webpages with .Navigate()
When the page has a js error I got a warning box for "Syntax error", so I used .put_Silent(TRUE). And now I get a warning for "VS Just-In-Time Debugger: Unhandled exception"…

flyout
- 497
- 1
- 9
- 16
2
votes
0 answers
What is the difference between IOleCommandTarget::Exec() enum options: OLECMDID_PRINT and OLECMDID_PRINT2?
I have a C++ application that uses the IWebBrowser2 interface to print a web page via ExecWB().
MSDN reports that OLECMDID_PRINT or OLECMDID_PRINT2 can be passed into this method but I can't find any explanation of the difference between the two. …

auujay
- 578
- 5
- 19