Article View: borland.public.cppbuilder.nativeapi
Article #13993Re: How to Trigger the Main Program from a Timer Procedure?
From: Bob Gonder
Date: Tue, 02 Sep 2003 07:08
Date: Tue, 02 Sep 2003 07:08
18 lines
1793 bytes
1793 bytes
Phuoc Can HUA wrote: >In my main program, there's a 'Next' button which can be triggered by the >user to load the next file. Can I trigger a button event from the timer and pretend >the user press the 'Next' button? Yes. the Next button has an ID. If you look in your Main, you should see the NextButtonID I think in the WM_COMMAND section. You would just SendMessage( hMainWnd, WM_COMMAND, NextButtonID, 0 ); Oh, wait, that's blocking... Use PostMessage instead. > Is that a good idea? AFAIK. > or better trigger a separate event to call the procedure directly? Ok also, but a little more work.
Technical Details
Message-ID:
<jvf8lv4n3r77fendn3jhcher6ppblrhsk3@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<oprus769kobq7az6@newsgroups.borland.com> <3f53a731$1@newsgroups.borland.com> <i7c7lv4b1hb6f6k5upe6qsv718q7qi1jth@4ax.com> <opruue6dumbq7az6@newsgroups.borland.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 00:09:27 PST From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: How to Trigger the Main Program from a Timer Procedure? Date: Tue, 02 Sep 2003 00:08:07 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <jvf8lv4n3r77fendn3jhcher6ppblrhsk3@4ax.com> References: <oprus769kobq7az6@newsgroups.borland.com> <3f53a731$1@newsgroups.borland.com> <i7c7lv4b1hb6f6k5upe6qsv718q7qi1jth@4ax.com> <opruue6dumbq7az6@newsgroups.borland.com> X-Newsreader: Forte Agent 1.91/32.564 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.31.165.48 X-Trace: newsgroups.borland.com 1062486487 67.31.165.48 (2 Sep 2003 00:08:07 -0700) Lines: 20 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail