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;

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.