Board index » cppbuilder » I can't read/write properties in HTML

I can't read/write properties in HTML

Hi,

I'm a new developer on ActiveX technology. I made a component inherit from ActiveForm (in C++ Builder4) to test this technology. If I import the control in C++ Builder it work fine, but if I import the control in a HTML page, I can't read or write any property.

The sentence that I still using is:

<p><object classid="clsid:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA"
border="0" width="274" height="223"><param name="Visible"
value="0"></object></p>

Some body knows what is wrong?

Thanks in advance, Lucio

Lucio Corral.
Departamento de I+D
Hardata S.A.
Chacabuco 1566 1 D
(1140) Ciudad de Buenos Aires, Argentina
+54-11-4300-DINE (3463)
www.hardata.com
www.audys.com
desarro...@audys.com
desarro...@hardata.com

 

Re:I can't read/write properties in HTML


You need to add support for the IPersistPropertyBag.
Here is a small sample

//---------------------------------------------------------------------------
class ATL_NO_VTABLE TActiveEFXImpl:
   VCLCONTROL_IMPL( TActiveEFXImpl, ActiveEFX, TActiveEFX, IActiveEFX,
   DIID_IActiveEFXEvents ),
   public IPersistPropertyBagImpl<TActiveEFXImpl>
          ^^^^^^^^^^^^^^^^ notice this

...

   AnsiString FileName; // this is data to hold the FileName property

  COM_INTERFACE_ENTRY_IMPL( IPersistPropertyBag )
   ^^^^^^^^^ add this to the BEGIN_COM_MAP

  PROP_ENTRY( "FileName", 15, CLSID_ActiveEFX)
  ^^^^^^^^^^^^^ add this to the BEGIN_PROPERTY_MAP

  STDMETHOD(get_FileName(BSTR* Value));
  STDMETHOD(set_FileName(BSTR Value));
  ^^^ add these to the methods implemented in your app ( this is
actually done by the type library editor when you add a property.

HTH,
Alex

Quote
> Departamento de I+D wrote:

[snip]

Re:I can't read/write properties in HTML


Alex,

    I see that I must add the command of the ATL to my project. Thanks you very much and sorry for my poor english!

--
Lucio Corral.
Nicols Angel Gambn.
Departamento de Desarrollo
Hardata S.A.
Chacabuco 1566 1 D
(1140) Ciudad de Buenos Aires, Argentina
+54-11-4300-DINE (3463)
www.hardata.com
desarro...@hardata.com
  Alex Bakaev [TeamB] <al...@jetsuite.com> escribi en el mensaje de noticias 38988C01.224F4...@jetsuite.com...
  You need to add support for the IPersistPropertyBag.
  Here is a small sample

  file://---------------------------------------------------------------------------
  class ATL_NO_VTABLE TActiveEFXImpl:
     VCLCONTROL_IMPL( TActiveEFXImpl, ActiveEFX, TActiveEFX, IActiveEFX,
     DIID_IActiveEFXEvents ),
     public IPersistPropertyBagImpl<TActiveEFXImpl>
            ^^^^^^^^^^^^^^^^ notice this

  ...

     AnsiString FileName; // this is data to hold the FileName property

    COM_INTERFACE_ENTRY_IMPL( IPersistPropertyBag )
     ^^^^^^^^^ add this to the BEGIN_COM_MAP

    PROP_ENTRY( "FileName", 15, CLSID_ActiveEFX)
    ^^^^^^^^^^^^^ add this to the BEGIN_PROPERTY_MAP

    STDMETHOD(get_FileName(BSTR* Value));
    STDMETHOD(set_FileName(BSTR Value));
    ^^^ add these to the methods implemented in your app ( this is
  actually done by the type library editor when you add a property.

  HTH,
  Alex

  > Departamento de I+D wrote:
  [snip]

Re:I can't read/write properties in HTML


You are welcome.

Alex

--
HotSend - portable documents technology
http://www.hotsend.com/
eFax - get your faxes via email - Free !
http://www.efax.com

Other Threads