Article View: borland.public.cppbuilder.nativeapi
Article #15300Re: SetEventTimer routine holds TThread task?
From: Remy Lebeau (TeamB)
Date: Wed, 09 Jul 2003 05:22
Date: Wed, 09 Jul 2003 05:22
23 lines
1840 bytes
1840 bytes
"Phuoc Can HUA" <home}a+t{huaonline.com> wrote in message
news:oprr0lg5y5bq7az6@newsgroups.borland.com...
> Here is my codes.
That was a little TOO much code to post.
> void CALLBACK LocalDisplay::Refresh( UINT uID, UINT uMsg, DWORD
> dwUser, DWORD dw1, DWORD dw2)
You can't use a class member method as the callback, unless the method is
declared as 'static'. Otherwise You have to use a standalone function
instead.
> for(;;)
If I had to guess, your loop is most likely running too tightly, eating up
the CPU cycles. Try putting a Sleep() in it to make it yield control
periodically so the CPU can do other things.
Gambit
Technical Details
Message-ID:
<3f0ba574$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!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-mailReferences:
<oprrwu2pcgbq7az6@newsgroups.borland.com> <3f08d164@newsgroups.borland.com> <oprrxfa6dpbq7az6@newsgroups.borland.com> <3f09295c@newsgroups.borland.com> <oprr0lg5y5bq7az6@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,a436a021eb0521f3 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-07-08 22:40:04 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <oprrwu2pcgbq7az6@newsgroups.borland.com> <3f08d164@newsgroups.borland.com> <oprrxfa6dpbq7az6@newsgroups.borland.com> <3f09295c@newsgroups.borland.com> <oprr0lg5y5bq7az6@newsgroups.borland.com> Subject: Re: SetEventTimer routine holds TThread task? Date: Tue, 8 Jul 2003 22:22:31 -0700 Lines: 25 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: <3f0ba574$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1057727860 207.175.226.26 (8 Jul 2003 22:17:40 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!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