CreateControl

来源:互联网 发布:linux检索文件内容 编辑:程序博客网 时间:2024/05/23 23:24
void CTest0515Active_1Dlg::OnBnClickedButtonLoadOcx(){    CRect rc;    GetClientRect(&rc);    rc.left = rc.right / 4;    rc.right = rc.right * 3 / 4;    rc.top = rc.bottom / 4;    rc.bottom = rc.bottom * 3 / 4;    bool bLoad = m_ActiveCtrl.CreateControl(        _T("{4E29832B-7197-4B2D-91F5-1DC449ED1E85}"),        _T("ActiveCtrl1"),        WS_VISIBLE,        rc,        this,        m_nID        );    if (bLoad == FALSE)    {        ::MessageBox(this->m_hWnd, _T("Error!!"), _T("Could not place control") ,MB_OK);        return;    }    m_ActiveCtrl.ShowWindow(SW_SHOW);
原创粉丝点击