Article View: borland.public.cppbuilder.nativeapi
Article #14159Re: How to Trigger the Main Program from a Timer Procedure?
From: Remy Lebeau (TeamB)
Date: Tue, 02 Sep 2003 16:55
Date: Tue, 02 Sep 2003 16:55
24 lines
2257 bytes
2257 bytes
"Bob Gonder" <notbg@notmindspring.invalid> wrote in message news:26n8lv07s0tvfprnifpa1g0taki56lojoo@4ax.com... > How does the VCL know which button was pressed? WM_COMMAND is sent to the Parent VCL control of the button, not the button itself. When the Parent control receives a WM_COMMAND message, it takes the HWND provided by the WM_COMMAND message, resolves it into a VCL TWinControl* pointer, then changes the message into a CN_COMMAND message and sends the new message to the TWinControl. The VCL uses the Win32 API function SetProp() to store the TWinControl* pointer inside the HWND for the control when it is first created, and then GetProp() to retreive it later. TButton (a descendant of TWinControl) then intercepts CN_COMMAND messages, test them for BN_CLICKED notifications, and act accordingly. Gambit --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/03
Technical Details
Message-ID:
<3f54cb7f@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<oprus769kobq7az6@newsgroups.borland.com> <3f53a731$1@newsgroups.borland.com> <i7c7lv4b1hb6f6k5upe6qsv718q7qi1jth@4ax.com> <opruue6dumbq7az6@newsgroups.borland.com> <jvf8lv4n3r77fendn3jhcher6ppblrhsk3@4ax.com> <3f5443bb$1@newsgroups.borland.com> <26n8lv07s0tvfprnifpa1g0taki56lojoo@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,e4cd861378e7d24 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-09-02 09:56:31 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <oprus769kobq7az6@newsgroups.borland.com> <3f53a731$1@newsgroups.borland.com> <i7c7lv4b1hb6f6k5upe6qsv718q7qi1jth@4ax.com> <opruue6dumbq7az6@newsgroups.borland.com> <jvf8lv4n3r77fendn3jhcher6ppblrhsk3@4ax.com> <3f5443bb$1@newsgroups.borland.com> <26n8lv07s0tvfprnifpa1g0taki56lojoo@4ax.com> Subject: Re: How to Trigger the Main Program from a Timer Procedure? Date: Tue, 2 Sep 2003 09:55:28 -0700 Lines: 26 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.1106 NNTP-Posting-Host: 207.175.226.26 Message-ID: <3f54cb7f@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1062521727 207.175.226.26 (2 Sep 2003 09:55:27 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail