在视中显示一个ActiveX控件的属性页


     -- lostall

    利用IOleObject::DoVerb达到这一目的。
   
关键代码:
//显示控件的属性对话框
void CShowPropPageView::OnShowPropPage(WPARAM wParam, LPARAM lParam)
{
CMyActiveX  *pCtrl = (CMyActiveX*)wParam;
LPUNKNOWN   pUnk   = pCtrl->GetControlUnknown();
if  (pUnk == NULL)
    return;

IOleObject *pObject=NULL;
if  (FAILED(pUnk->QueryInterface(&pObject)))
    return;

pObject->DoVerb(OLEIVERB_PROPERTIES, NULL, NULL, 0, this->m_hWnd, NULL);
pObject->Release();
}

你可能感兴趣的:(properties,null)