Solved

HWND of the browser in ActiveX

Posted on 2000-03-14
2
826 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 150 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Suggested Solutions

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

710 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