Article View: borland.public.cppbuilder.nativeapi
Article #8344Re: SendMessage, WM_COPYDATA, FindWindow and TApplication
From: Stefano Bonifazi
Date: Mon, 01 Nov 2004 20:41
Date: Mon, 01 Nov 2004 20:41
48 lines
2573 bytes
2573 bytes
THANK You very much for Your reply Mr. Lebeau...
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
news:4183d9c2$1@newsgroups.borland.com...
>
> "Stefano Bonifazi" <stefboombastic@tele2.it> wrote in message
>> FindWindow("TForm1","Form1") fails
>
> Then you are not using it correctly, because it works fine for me whenever
I
> use it.
If U say it should work then I'll try that again!:-)
> > Stopping here I can only send the message to the "application window"...
>
> Not true. You can send messages to any window.
I meant I could send message only to the "application window" because I
could not get the Form's handle ...
>
> Correct. For other messages, you will need to use
> Application->HookMainWindow() instead.
Thank U ... as always U have the solution for every my problem that's what I
needed
> > 2)Is there a way to get the MainForm handle by using FindWindow?
>
> You already know how. There is nothing wrong with using
> FindWindow("TForm1", "Form1"), it works fine assuming those are your
actual
> values of your window. I do strongly recommend that you give your forms
> more unique names, though, to prevent FindWindow() from finding windows
that
> belong to other applications instead of your own, in case you are running
> other VCL programs written by other people. You should never stick with
> using the default names for very long.
>
I always use personal full qualified names for all my program' objects, but
I prefer to use the standard ones, when I post a thread, to help who read to
understand better the problem :)
>
Thank You again Mr Gambit!!!
My best regards!
Stefano B.
Technical Details
Message-ID:
<41869f6d@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<4183708b@newsgroups.borland.com> <4183d9c2$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,42878f3b25dcd7e1 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Stefano Bonifazi" <stefboombastic@tele2.it> Newsgroups: borland.public.cppbuilder.nativeapi References: <4183708b@newsgroups.borland.com> <4183d9c2$1@newsgroups.borland.com> Subject: Re: SendMessage, WM_COPYDATA, FindWindow and TApplication Date: Mon, 1 Nov 2004 21:41:16 +0100 Lines: 50 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 151.24.159.197 Message-ID: <41869f6d@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1099341677 151.24.159.197 (1 Nov 2004 12:41:17 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail