• 您的位置我爱Aspx >> VC.Net >> 走出MFC子类化的迷宫
  • 走出MFC子类化的迷宫

  • 作者:aspxer  来源:internet  日期:2007-5-21 23:49:05  关键字:
  • if (hWndControl != NULL) return SubclassWindow(hWndControl);

    #ifndef _AFX_NO_OCC_SUPPORT

    if (pParent->m_pCtrlCont != NULL)

    {

    // normal dialog control not found

    COleControlSite* pSite = pParent->m_pCtrlCont->FindItem(nID);

    if (pSite != NULL)

    {

    ASSERT(pSite->m_hWnd != NULL);

    VERIFY(SubclassWindow(pSite->m_hWnd));

    #ifndef _AFX_NO_OCC_SUPPORT

    // If the control has reparented itself (e.g., invisible control),

    // make sure that the CWnd gets properly wired to its control site.

    if (pParent->m_hWnd != ::GetParent(pSite->m_hWnd))

    AttachControlSite(pParent);

    #endif //!_AFX_NO_OCC_SUPPORT

    return TRUE;

    }

    }

    #endif

    我对这篇文章有话说?
  • 广告位招租,广告代号:content_468_15
  • 上一篇:传递自动化字符串数组
    下一篇:C#和C++的速度大比拼(二)
  • 相关文章