Article View: borland.public.cppbuilder.nativeapi
Article #9582Re: SendMessage
From: Mark Guerrieri
Date: Mon, 21 Jun 2004 16:31
Date: Mon, 21 Jun 2004 16:31
45 lines
1968 bytes
1968 bytes
You can send anything you want, as long as it is defined and the receiver
knows what to do with it. Just make sure your message doesn't conflict with
an existing message, i.e make sure it is defined as WM_USER + {some value}.
Mark
"Digby Millikan" <digbym@internode.on.net> wrote in message
news:40d70160@newsgroups.borland.com...
> Hi!
>
> I have a bcb application running and I wish it to run some code
> by sending it a message with SendMessage.
> If I place the code within a WndProc, what message can I send
> it, do I have to use messages from a pre determined list or can I
> make my own message up e.g.
>
> first application;
>
> void __fastcall TGBNGForm::WndProc(TMessage &Message)
> {
> if((Message.Msg==WM_RUNMYCODE){
> Message.Result=false;
> StatusBar(Sender);
> }else{
> TForm::WndProc(Message);
> }
> }
>
> second application;
>
> SendMessage(GBNGHandle,WM_RUNMYCODE,NULL,NULL);
>
>
> Can I use the message WM_RUNMYCODE?
>
> Digby
>
>
>
>
>
>
>
>
>
Technical Details
Message-ID:
<40d70d6d$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40d70160@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,b47642e92e7a84b X-Google-Attributes: gid10cc67,public Reply-To: "Mark Guerrieri" <mguerrieri@cmsgrp.com> From: "Mark Guerrieri" <mguerrieri@cmsgrp.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <40d70160@newsgroups.borland.com> Subject: Re: SendMessage Date: Mon, 21 Jun 2004 12:31:41 -0400 Lines: 47 Organization: Creative Marketing Strategies X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 66.200.143.50 Message-ID: <40d70d6d$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1087835501 66.200.143.50 (21 Jun 2004 09:31:41 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail