Click to See Complete Forum and Search --> : Can anyone help me?


Yu weidong
March 30th, 1999, 10:37 PM
Hi,Guru:

I created an invisible ActiveX control with VC++.The question is that when I use the CWnd::GetParent(),the handle I get is not the control's parent at all.But the situation is not like that if the activex is visible at its runtime.How could I get the parent property of an invisible activex control in VC++?


Thanks lots!


ShineSoft Free ActiveX Components by Yu weidong

Masaaki Onishi
March 31st, 1999, 12:21 AM
Hi.

Check this.

HOWTO: Retrive the Actual Parent Widnow of An ActiveX control

ID: Q150204 by MSDN Help.

HWND CMyOleControl::GetActualParent()

{

HWND hwndParent = 0;

if(m_pInPlaceSite != NULL)

m_pInPlaceSite->GetWindow(&hwndParent);


return hwndParent;

}


Hope for help.

-Masaaki Onishi-

Yu weidong
March 31st, 1999, 03:22 AM
Hi,thank you very much!

I would have a check.Tommorrow I would give you the result.

regards!

Yu weidong
March 31st, 1999, 07:48 PM
Hello,Mr Masaaki Onishi:

Thank you very much for your advice.I had success ussing

the code you provided.


Best wishes!

Yu weidong


ShineSoft Free ActiveX Components by Yu weidong