CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 1999
    Posts
    18

    Can anyone help me?



    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

  2. #2
    Join Date
    Mar 1999
    Posts
    22

    Re: Check Article ID:Q150204



    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-

  3. #3
    Join Date
    Mar 1999
    Posts
    18

    Re: Check Article ID:Q150204



    Hi,thank you very much!

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

    regards!

  4. #4
    Join Date
    Mar 1999
    Posts
    18

    Thank you very much!



    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured