错误:error C2440: '=' : cannot convert from 'unsigned short ** ' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
E:\CJ\TestPIE\PluginIE.cpp(24) : error C2664: 'MessageBoxA' : cannot convert parameter 2 from 'class ATL::CComBSTR' to 'const char *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Error executing cl.exe.
You may want to use IE's Automation (have a look at IWebBrowser2 and
IHTMLDocument2 in particular). And to get a pointer on an existing instance
of IE have a look overthere
http://support.microsoft.com/support/kb/articles/Q176/7/92.ASP
You can also consult
news:microsoft.public.inetsdk.programming.webbrowser_ctl
Also if you don't already have it, I would recommend you to download the
latest version of the Platform SDK in order to have the documention to the
IHTMLxxx interfaces (the documentation of IWebBrowser2 is bundled with
MSVC++6)
how to retrieve the URL from all opened IE windows:
1. Enumerate all top-level windows using the EnumWindows callback (this gives us a Handle)
2. Grab the Caption (Title) of each Window
3. Look only for windows whose class name is "IEFrame"
4. Use the FindWindow provided with the Handle and the Caption to locate the correct IE window
5. Call FindWindowEx several times to locate the ComboBox carying the URL, as it is the child to some parent which is a child to our top-level IEFrame (this is the class name) window
6. Send a message to the ComboBox to retrieve the text inside it
7. Nothing more, really.