473,467 Members | 1,985 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to Read an Active X Control?

My application is an MFC application but since MFC is essentially a
Object Oriented wrapper for Win32 I am taking the liberty to post my
question here. I also must confess that I am not an Active X
programmer.

Here is my problem:
I have to read a text string from a non editable TextBox in an "alien"
application. I say "alien" b'cas it is a third party application whose
source code is not available to me. The third party vendor tells me
that the non editable TextBox is implemented as an Active X Control.

The issues I have are as follows:
1. What must I do to get a handle (in MFC it would be a CWnd to the
ACTIVE X Control)?

2. I Don t believe that Spy++ lists all the Windows that I can
visually see in the target (i.e. third party) application. What are
the Windows that Spy++ will EXCLUDE in its Windows Hierarchy display.

3. Once I get a handle (in MFC - CWnd) to an Active X window I can get
the IUnknown to the Active X Control. Please let me know if this
understanding of mine is correct. The IUnknown can be obtained by any
one of the following calls:

LPUNKNOWN pUnk;
IUnknown *pi=0;
pUnk = localParentCWnd->GetControlUnknown();
If the ActiveX control is inside an ActiveX container then:
cmdTarg = (CCmdTarget *) localParentCWnd;
pUnk = cmdTarg->GetControllingUnknown();
If the ActiveX Container has native Windows controls inside it then:
HRESULT hr = AtlAxGetControl(localParentCWnd->m_hWnd,&pi);

Kannan
Nov 17 '05 #1
0 1255

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Pierre Mengal | last post by:
Active Up is pleased to announce the release of 3 new products. All these products are now part of the Web.Controls Suite . The products featured in the package are: Active Image ..NET...
3
by: Robert Neville | last post by:
How do you return the last Active Control when the control is on a tab control? Screen.ActiveControl does not seem to work. Here's the statement that my code uses. Set ctlOld =...
1
by: Dave | last post by:
Hi, I have an active x control that been createted when i drop it on a win form and sent event to the form event function(like button click event for button control or so), This active x send...
1
by: Morten Snedker | last post by:
Just for the sake of learning, I'm trying to make a simple Active-X in VB.NET. It should contain the MonthCalendar control, a date should be picked, and the Active-X control would return the...
5
by: Mike | last post by:
I have been using an Active X control(SFrmAx52.ocx) in my Access program without problem in the past. However now I can see the control(SFrmAx52.ocx) in my System 32 folder, I see the control...
4
by: Sarita Sai Bhushan | last post by:
Hi, While I was developing a active desktop web page in ASP.Net using server controls I faced a problem with the autopostback property of server control. The sever control I used in my aspx page...
2
by: Jim in Arizona | last post by:
My goal, somehow, is to populate a dropdownlist with all the user names in active directory. I don't even know where to begin, really. I added a reference to System.DirectoryServices so I could...
3
by: Big Charles | last post by:
Hello, My ASP.NET application has to read a DBF file in a CD from CD-Drive of a client PC. Then, I have to pass the data to a DataReader. The route is: Client-PC -Server The DBF file could be...
2
by: Randy | last post by:
I have a form on which various controls are added dynamically depending on actions of the user. One of these actions allows the user to click a delete button that will remove various other...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.