-- 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();
}