Article View: comp.os.ms-windows.programmer.win32
Article #2147Re: SetTimer
From: Joris Van Damme
Date: Tue, 06 Oct 1998 00:00
Date: Tue, 06 Oct 1998 00:00
25 lines
1652 bytes
1652 bytes
Robin Burrows wrote: > I am using a fprintf in my WM_TIMER, but the file > remains open so the buffering should absorb it, there is no other > lengthy code in there. What is the minimum gap between interrupts? Or am > I just being dense? Do I really have to use GetTickCount and compensate > for it myself? Greetings. I share the opinions of the people who already responded. I'ld like to add though that I find this a strange way to print. Probably your concern is to to not block the main thread - which would result in 'blank' pieces of screen waiting to be updated during the printing process, and the user would not be able to do anything. There are several other, proper, ways to take case of this. Do the printing in another thread. This is by far the best way, but also not very easy if you didn't do this before. The ProcessMessages is a far easier way out: encapsulate the timer code in in a loop, and do a ProcessMessages after each loop. Joris Van Damme ecogreen.joris.vandamme@ping.be
Technical Details
Message-ID:
<3619EA96.9D283877@ping.be>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3619553C.11D5@bigfoot.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103bde,2b2eac0b958b7811 X-Google-Attributes: gid103bde,public X-Google-Thread: 113dfb,2b2eac0b958b7811 X-Google-Attributes: gid113dfb,public From: Joris Van Damme <ecogreen.joris.vandamme@ping.be> Subject: Re: SetTimer Date: 1998/10/06 Message-ID: <3619EA96.9D283877@ping.be> X-Deja-AN: 398222893 Content-Transfer-Encoding: 7bit References: <3619553C.11D5@bigfoot.com> Content-Type: text/plain; charset=us-ascii Organization: EUnet Belgium, Leuven, Belgium Mime-Version: 1.0 Newsgroups: comp.os.ms-windows.programmer.win32,borland.public.cpp.winapi