?
Solved

HWND of the browser in ActiveX

Posted on 2000-03-14
2
Medium Priority
?
840 Views
Last Modified: 2013-12-03
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
Comment
Question by:gilad111397
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Expert Comment

by:Binder
ID: 2617370
 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
 
LVL 23

Accepted Solution

by:
chensu earned 450 total points
ID: 2617592
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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question