Board index » cppbuilder » Adding Properties to my ActiveX - Help

Adding Properties to my ActiveX - Help

I created an ActiveX Form and added a Property Page. There both
connected now.

However I'm failing in associating each control with its corresponding
property.

How do I associate properties (created in the type library) with the
controls in the
Property Page and the ActiveX Form.

The Help is not saying allot about how to do it, it simply says "do it"

Is there also a way to create events like

OnMyPropertyChanged    ?

Please Help

 

Re:Adding Properties to my ActiveX - Help


Quote
Bilgi Sakarya wrote:

> I created an ActiveX Form and added a Property Page. There both
> connected now.

> However I'm failing in associating each control with its corresponding
> property.

> How do I associate properties (created in the type library) with the
> controls in the
> Property Page and the ActiveX Form.

> The Help is not saying allot about how to do it, it simply says "do it"

> Is there also a way to create events like

> OnMyPropertyChanged    ?

> Please Help

Re:Adding Properties to my ActiveX - Help


Having same problem. somebody pleaseeeeeeeeeee help.

Ara

Quote
Bilgi Sakarya wrote in message <35B75649....@riskreturn.ch>...
>I created an ActiveX Form and added a Property Page. There both
>connected now.

>However I'm failing in associating each control with its corresponding
>property.

>How do I associate properties (created in the type library) with the
>controls in the
>Property Page and the ActiveX Form.

>The Help is not saying allot about how to do it, it simply says "do it"

>Is there also a way to create events like

>OnMyPropertyChanged    ?

>Please Help

Re:Adding Properties to my ActiveX - Help


Hello,

First let me stress that after going to the conference 2 weeks ago and after
browsing the forum last week, it's evident that CBuilder is in dire need of
examples in the ActiveX area. I've informed the appropriate person that we
need to schedule time to write examples illustrating whatever we put out.

I'll assume that the problem you're experiencing is in the
UpdatePropertyPage method, right? If yes, I'll assume that your control's
main interface is IMyControl. The xxxx_TLB.H file should contain an
interface wrapper by the name of IMyControlDisp [it a disp wrapper for your
control's main interface] which facilitates binding and retrieve property
values of the control. The following is an example:

void __fastcall TMyPropertyPage::UpdatePropertyPage(void)
{
        // Bind to my Control's default dispinterface
        IMyControlDisp ctl;
        ctl.Bind(OleObjects->First());

        // Update property page's Text control to show current value of
Caption property
        Edit1->Text = AnsiString(ctl.Caption);

        ....

Quote
}

Let me know if this is not where you're experiencing problems. I'll be happy
to investigate.

Bruneau.

Quote
Ara Bedrossian wrote in message <6r8845$j...@forums.borland.com>...
>Having same problem. somebody pleaseeeeeeeeeee help.

>Ara

>Bilgi Sakarya wrote in message <35B75649....@riskreturn.ch>...
>>I created an ActiveX Form and added a Property Page. There both
>>connected now.

>>However I'm failing in associating each control with its corresponding
>>property.

>>How do I associate properties (created in the type library) with the
>>controls in the
>>Property Page and the ActiveX Form.

>>The Help is not saying allot about how to do it, it simply says "do it"

>>Is there also a way to create events like

>>OnMyPropertyChanged    ?

>>Please Help

Other Threads