BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ActiveX event firing in BDS2006

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (ActiveX)
View previous topic :: View next topic  
Author Message
Blue Knight
Guest





PostPosted: Tue Feb 20, 2007 4:47 pm    Post subject: ActiveX event firing in BDS2006 Reply with quote



Hi all,

I am using BDS2006 and have created a COM object with a single event.
However, I want to be able to "fire" this event from within my code and
I was wondering how I would do this. I can't seem to find any examples
(in C++) for this.

The COM object is called IMyCtrl, the event section is IMyCtrlEvents
with a single event (currently) called OnMyEvent.

Regards,

Blue Knight
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Wed Feb 21, 2007 12:26 am    Post subject: Re: ActiveX event firing in BDS2006 Reply with quote



"Blue Knight" <bevan231X (AT) Xhotmail (DOT) com> wrote in message
news:45dad182$1 (AT) newsgroups (DOT) borland.com...

Quote:
I am using BDS2006 and have created a COM object with a
single event. However, I want to be able to "fire" this event from
within my code and I was wondering how I would do this.

Your COM object implementation class should have a public
Fire_OnMyEvent() method that was generated for you to use.


Gambit
Back to top
Blue Knight
Guest





PostPosted: Wed Feb 21, 2007 12:52 am    Post subject: Re: ActiveX event firing in BDS2006 Reply with quote



Hi Remy,

Quote:
I am using BDS2006 and have created a COM object with a
single event. However, I want to be able to "fire" this event from
within my code and I was wondering how I would do this.

Your COM object implementation class should have a public
Fire_OnMyEvent() method that was generated for you to use.

I wondered about that, but I couldn't find the method. I have the TLB
file open (giving the tree view), and I created an event under IMyEvents
called MyEvent. But there was no Fire_MyEvent method created.

Have I done something wrong in the setup, or is something missing?

Regards,

Bevan
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Wed Feb 21, 2007 5:05 am    Post subject: Re: ActiveX event firing in BDS2006 Reply with quote

"Blue Knight" <bevan231X (AT) Xhotmail (DOT) com> wrote in message
news:45db434f (AT) newsgroups (DOT) borland.com...

Quote:
I wondered about that, but I couldn't find the method. I have the
TLB file open (giving the tree view), and I created an event under
IMyEvents called MyEvent. But there was no Fire_MyEvent
method created.

It should be in a class that is generated to wrap your events, ie
TEvents_MyCoClass, which is a class that your main Impl class is then
derived from.

Quote:
Have I done something wrong in the setup, or is something missing?

Did you enable the "Generate event support code" option when you
created the COM object?


Gambit
Back to top
Blue Knight
Guest





PostPosted: Wed Feb 21, 2007 9:10 am    Post subject: Re: ActiveX event firing in BDS2006 Reply with quote

Hi Remy,

Quote:
I wondered about that, but I couldn't find the method. I have the
TLB file open (giving the tree view), and I created an event under
IMyEvents called MyEvent. But there was no Fire_MyEvent
method created.

It should be in a class that is generated to wrap your events, ie
TEvents_MyCoClass, which is a class that your main Impl class is then
derived from.

Have I done something wrong in the setup, or is something missing?

Did you enable the "Generate event support code" option when you
created the COM object?

Thanks for that - yes I had done this, but with further searching in
this area I discovered that I needed to call
MyObjectInstance->Fire_MyEvent(parm1, parm2).

Regards,

Bevan
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (ActiveX) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.