p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Visual Studio 2005 (http://p2p.wrox.com/forumdisplay.php?f=140)
-   -   ActiveX : getting PARAM value in activeX src (http://p2p.wrox.com/showthread.php?t=66198)

smaraux February 26th, 2008 01:28 PM

ActiveX : getting PARAM value in activeX src
(under VS 2005)


I have found this topic which quite match my issue with activeX, but for VB :


I am building an activeX version of my VRML Player app.

I would like to embed the activeX in a HTML page, using object tag for the object, and <PARAM name="src" value="mycontent.wrl"> as url information.

I do not manage to get the value inside the activeX !

I declared a property on the control lib, with class wizard.

It added a m_src member, onsrcChanged method and an IDL entry and a line in dispatch map :

BEGIN_DISPATCH_MAP(CmgfActiveXCtrl, COleControl)
    DISP_PROPERTY_NOTIFY_ID(CmgfActiveXCtrl, "src", dispidsrc, m_src, OnsrcChanged, VT_BSTR)

When i look at the m_src value in OnCreate, it does not hold "myContent.wrl" but it is empty.

I have tried to set it via html body "onload" but this does not work either.

Do you have any tip concerning activeX and PARAM usage in activeX control ? (I also tried with a less used parameter name testVar, without success)

smaraux March 4th, 2008 12:31 PM

Answer to myself :

classwizard do not complete DoPropExchange for each persistent property.

I have added PX_String(pPX, L"src", m_src, L""); in this method and it works just like it should.

All times are GMT -4. The time now is 09:48 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.