I am using 3 threads where two of them doing timecritical jobs.
One of them is used for continous data acquisition over a DAC-board
with fixed sample rate.
The other one should display a graphic (e.g. bitmap) at defined
moments on screen.
Displaying on screen(i.e. on the view of my window application) is
usally done by calling invalidate(), which calls itself the function
OnDraw().
But this is too slow and displays with to inaccurate time delays.
Is a better, faster and exacter method known ?
Best regards
Dietmar
-------------------------------------------------
Dietmar Völk at Graz University of Technology, Austria
http://www.cis.tu-graz.ac.at/home/dvoelk/
mailto:dvo...@sbox.tu-graz.ac.at
You should take a look at the DirectDraw API.
Regards,
--
Robert Schlabbach
e-mail: rob...@powerstation.isdn.cs.TU-Berlin.DE
Technical University of Berlin, Germany
Not neccessarily worth the effort. I suggest that the original poster
consider not using invalidate(), but instead call OnDraw (or another
painting method) directly (preparing a CDC pointer to pass first, of
course, if you use OnDraw).
--
Robert Schmidt <r...@vingmed.no>
Software Developer / Vingmed Sound tel +47 67124237 fax +47 67124355
Private tel +47 22352293 WWW http://www.nvg.unit.no/~rsc
jeg lukker et oye og ser halvt
jeg lukker begge og ser alt -- seigmen
>I am using 3 threads where two of them doing timecritical jobs.
>One of them is used for continous data acquisition over a DAC-board
>with fixed sample rate.
>The other one should display a graphic (e.g. bitmap) at defined
>moments on screen.
>
>Displaying on screen(i.e. on the view of my window application) is
>usally done by calling invalidate(), which calls itself the function
>OnDraw().
>But this is too slow and displays with to inaccurate time delays.
>
>Is a better, faster and exacter method known ?
DirectDraw is probably fast, but you fall into a nest of requirements if
you want to ship a DirectX product. I suspect it needs Win95 with a service
pack, and I know it requires WinNT with SP3.
Even if you directly draw, your program probably has an invalid strategy.
You need to create a shadow bitmap, and paint into this. Each time you
paint, Invalidate a rectangle or region in the real window where you paint.
Then at WM_PAINT time, (OnDraw), copy the shadow into the window. The copy
function will be executed as close to the video card as possible, and it
will efficiently only happen in the areas invalidated. There is probably
sample code out there that does this - surf for "double buffer".
-- Phlip
======= http://users.deltanet.com/~tegan/home.html =======
-- Instant Virtual Gratification Plug-in now available --
For those times I've needed a real-time display, I've created a
background thread dedicated to updating the screen image.
That's all it does ad nauseum - certainly improves upon the speed of the
standard messaging system :-)
--
Cheers, Ray
------------------------------ <*> ---------------------------
Ray Jones TO4(eng) Bureau of Meteorology
,-_|\ E-mail: ray....@bom.gov.au Radar Engineering Section
/ \ Phone: +613 96694152 (Office) 326 Hoddle St,
\_,-.*/ +613 96694153 (Lab) Abbotsford, VIC, 3067
v Fax: +613 94190204 AUSTRALIA
------------------------------ <*> ---------------------------