-
January 28th, 2005, 05:12 PM
#1
How to get interface to ActiveX control?
Hi,
I am attempting to obtain a pointer to an activex control's interface w/ only a handle to the control. Here's what I'm doing:
CWindow wGrid;
wGrid.Attach(hGrid);
IUnknown *pUnk;
hr = wGrid.GetDlgControl(nCtrlID, IID_IUnknown, (void**)&pUnk);
The return to hr is always E_FAIL however. I've also tried similar code w/ the CAxWindow class and AtlAxGetControl function. Every time, I get a return of E_FAIL. Does anyone know how to get a pointer to the interface so that I can retrieve data from this control? Thanks.
Mark
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|