Display an active page of an ActiveX control in the view

zhaozj2021-02-11  195

-

Lostall

Using IoleObject :: DoverB to achieve this.

Key code:

// Display the properties dialog of the control

Void CShowProppageView :: ONSHOWPROPPAGEVIEW :: OnseProppage (WPARAM WPARAM)

{

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

}

转载请注明原文地址:https://www.9cbs.com/read-3941.html

New Post(0)