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 

How can I send a message between a ActiveX-Com-Object and a

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ActiveX Controls Development
View previous topic :: View next topic  
Author Message
Thomas Malchar
Guest





PostPosted: Sat Aug 09, 2003 11:14 am    Post subject: How can I send a message between a ActiveX-Com-Object and a Reply with quote



Hi,

I need to communicate between a ActiveX-COM-Object (written in Delphi) and a
Delphi application. I use SendMessage with WM_COPYDATA.

I can send the message from the ActiveX to the application, but how can I
send back my data with WM_COPYDATA to the ActiveX. Which handle have the
ActiveX?

Thanks for help.

Regards,
Thomas


Back to top
Michael Kelly
Guest





PostPosted: Sat Aug 09, 2003 4:22 pm    Post subject: Re: How can I send a message between a ActiveX-Com-Object an Reply with quote



On Sat, 9 Aug 2003 13:14:52 +0200, "Thomas Malchar" <malchar (AT) mafis (DOT) de> wrote:

Quote:
I can send the message from the ActiveX to the application, but how can I
send back my data with WM_COPYDATA to the ActiveX. Which handle have the
ActiveX?

See TActiveXControl.Control.Handle

--

"I don't want to belong to any club that would have me as a member."

-- Groucho Marx

Back to top
Thomas Malchar
Guest





PostPosted: Sat Aug 09, 2003 6:44 pm    Post subject: Re: How can I send a message between a ActiveX-Com-Object an Reply with quote



Quote:
See TActiveXControl.Control.Handle

I have a TAutoObject with has no Control.Handle. See following code:

type
TSendTest = class(TAutoObject, ISendTest)
private
function SendData(hWindow: HWND; sData: string): boolean;
end;




Back to top
Michael Kelly
Guest





PostPosted: Sun Aug 10, 2003 3:51 pm    Post subject: Re: How can I send a message between a ActiveX-Com-Object an Reply with quote

On Sat, 9 Aug 2003 20:44:13 +0200, "Thomas Malchar" <malchar (AT) mafis (DOT) de> wrote:

Quote:
See TActiveXControl.Control.Handle

I have a TAutoObject with has no Control.Handle. See following code:

type
TSendTest = class(TAutoObject, ISendTest)
private
function SendData(hWindow: HWND; sData: string): boolean;
end;


If it doesn't have a handle then you can't send a Windows message.
Use TActiveXControl instead.

--

"I don't want to belong to any club that would have me as a member."

-- Groucho Marx


Back to top
Maynard Philbrook
Guest





PostPosted: Tue Aug 19, 2003 6:14 pm    Post subject: Re: How can I send a message between a ActiveX-Com-Object an Reply with quote

since the WM_COPYDATA does send you a pointer to obtain the data i can
only assume that if you follow a protocol you can make sure there would be
enough room in the buffer that was created from the X control to allow you to
simply modify the contents on return..
thus the X control can check for messages or info coming back from your
app.
ect..
so if you were to create lets say a fixed 1024 byte buffer using some
1 byte protocol to talk to each the X control can initiate the buffer, when it
needs
to check your app for any possible data it can send lets say an inquiry Byte ..
the app would alter this buffer and send back data if there is data changing
the
protocol byte to reflect the type of response.


Thomas Malchar wrote:

Quote:
Hi,

I need to communicate between a ActiveX-COM-Object (written in Delphi) and a
Delphi application. I use SendMessage with WM_COPYDATA.

I can send the message from the ActiveX to the application, but how can I
send back my data with WM_COPYDATA to the ActiveX. Which handle have the
ActiveX?

Thanks for help.

Regards,
Thomas

--
To See what real programmers do in their spare time visit
http://jamie12.home.mindspring.com
home of PC bit software ..
Please send comments about my work .



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ActiveX Controls Development 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.