How do you read the <param> tags in an ATL ActiveX control?

Posted on 2006-06-02
Last Modified: 2013-11-25
I'm making an ATL ActiveX control and I want to read in the param tags which are nested inside the object tag but I can't figure out how to do it.  Does anyone know where I can find a sample or documentation on how to do this?
Question by:GENTP
    LVL 86

    Accepted Solution

    The PARAM names must correspond to properties your control exposes, then they'll be set automativally by the browser. See e.g. ("Firing Events among ActiveX controls on IE") where this is demonstrated with a 'PenColor'.
    LVL 5

    Author Comment

    hm, I can't get it to work with my implementation.  Well work properly that is.  I've managed to get that "This may be unsafe are you sure?" dialog to popup but I can't figure out how to get the damn thing to read the value.

    I have this defined at the top of my class

    public IPersistPropertyBagImpl<Cax3DPlugin>

    And then

       PROP_DATA_ENTRY("_cx",, VT_UI4)
       PROP_DATA_ENTRY("_cy",, VT_UI4)
       PROP_ENTRY("Mission", 1, CLSID_NULL)

    (Mission being the text value that I'm trying to read) and thats about as far as I have managed to get.  If I make get_Mission and put_Mission functions they never seem to get called.  Got any ideas?
    LVL 86

    Expert Comment

    >>If I make get_Mission and put_Mission functions they never seem to get called.  Got any ideas?

    They will be generated by teh framework, just like in the article I linked.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
    With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
    The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
    The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now