• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 847
  • Last Modified:

HWND of the browser in ActiveX

Hi,

I have an ActiveX that is loaded from the browser (using OBJECT tag) and I need HWND for a function in one of the dlls that I'm loading (in the ActiveX).

Any idea ?
0
gilad111397
Asked:
gilad111397
1 Solution
 
BinderCommented:
 You may try GetParentOwner()->m_hWnd if you are
using Visual C++ and MFC. If not you can use the
function GetWindow from the windows API.
0
 
chensuCommented:
Use the technique described in the following KB article to get the IWebBrowser2 interface and then call the IWebBrowser2::get_HWND method.

INFO: Accessing the Object Model from Within an ActiveX Control
http://support.microsoft.com/support/kb/articles/Q172/7/63.ASP
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now