🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #13991

Re: How to Trigger the Main Program from a Timer Procedure?

#13991
From: Phuoc Can HUA
Date: Mon, 01 Sep 2003 22:52
32 lines
2023 bytes
The 3rd option sounds good for my case. It's ok to wait until the main 
program
to take control.
Do you have any sample codes for sending/receiving messages? I have never 
done this before.

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? Is that a good idea? or better trigger a separate 
event to call the procedure directly?

thanks
Phuoc Can HUA

On Mon, 01 Sep 2003 13:56:32 -0700, Bob Gonder 
<notbg@notmindspring.invalid> wrote:

>>
> Or, if you really need to use the timer method you have a couple of
> choices.
> 1) The timer triggers an event that the LoadFile thread is waiting on.
> 2) The timer starts the LoadFile thread which self-terminates.
> 3) The timer does SendMessage to the main program.
>


-- 
_/\__/\__/\__/\__/\__/\_
www.huaonline.com
My Homepage is my Castle
Technical Details
Message-ID: <opruue6dumbq7az6@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <oprus769kobq7az6@newsgroups.borland.com> <3f53a731$1@newsgroups.borland.com> <i7c7lv4b1hb6f6k5upe6qsv718q7qi1jth@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-01 16:00:48 PST
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: How to Trigger the Main Program from a Timer Procedure?
References: <oprus769kobq7az6@newsgroups.borland.com> <3f53a731$1@newsgroups.borland.com> <i7c7lv4b1hb6f6k5upe6qsv718q7qi1jth@4ax.com>
Message-ID: <opruue6dumbq7az6@newsgroups.borland.com>
Content-Type: text/plain; charset=iso-8859-15; format=flowed
From: Phuoc Can HUA <home}a+t{huaonline.com>
MIME-Version: 1.0
Date: Tue, 02 Sep 2003 08:52:51 +1000
User-Agent: Opera7.10/Win32 M2 build 2840
NNTP-Posting-Host: 203.194.21.162
X-Trace: newsgroups.borland.com 1062457086 203.194.21.162 (1 Sep 2003 15:58:06 -0700)
Lines: 32
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail