• 0

[C++] internet browser functions


Question

I know in C++ "Internet_Explorer_Server" hwnd's can be created.

My question is, if I capture the HWND of one of these windows, how would I direct commands to it, like sending urls, etc.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

sorry to bump my own thread but I'm really having problems figuring this out. I think it's some sort of webbrowser control.

I'll go into more detail:

I'm capturing the HWND of this "internet_explorer_server" class from another program, which uses this browser window(no url box, just a back and forward button) to access the programs website. I plan on being able to navigate this window to whatever URL I wish, which is the purpose of my code.

Link to comment
Share on other sites

  • 0

Ok...did that...this is my code...and the Ccom-type commands are giving me errors.

HWND web = FindWindowEx(tf4,NULL,"Internet Explorer_Server",NULL);

   CComPtr<IUnknown> punkie;
   CComQIPtr<IWebBrowser2> pwb2;

   AtlAxGetControl(web, &punkie);
   pwb2 = punkie;

  pwb2.SetSite = data;

"data" consists of a url.

Link to comment
Share on other sites

  • 0

There is no standard window class called "Internet_Explorer_Server". Whatever it may be, it sounds like a random name picked by whoever made the program. The only thing I can suggest is that you try using Spy++ to see what messages the window receives.

Link to comment
Share on other sites

  • 0
There is no standard window class called "Internet_Explorer_Server". Whatever it may be, it sounds like a random name picked by whoever made the program. The only thing I can suggest is that you try using Spy++ to see what messages the window receives.

584765569[/snapback]

I think it's an IWebBrowser control, and using the above code to control it gives me errors. any ideas?

Link to comment
Share on other sites

  • 0

ok, I've learned that "Internet Explorer_Server" like that, is an IE instance.

It is controlable through the IE_server window, and the Shell DocObject View window with WM_COMMAND

There are several Command IDs, listed here: http://www.swissdelphicenter.ch/torry/showcode.php?id=2231

and here: http://www.codeguru.com/Cpp/I-N/internet/g...icle.php/c8163/

However, none to navigate/open a website. Does anyone know how to get context menu IDs for the "File->Open" in Internet explorer, or know of a command ID to do so?

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.