Hi,

there are two threads in my Dll, working in the base program. Both threads produces double buffered graphics in a window. If the threads are very very busy, sometimes they "forget" to clear the graphics on the window and produces graphic error's.
If only one thread works, there are errors too, but less.
I have WindowsXP, when i had Windows 98, there were no graphical errors...
Any ideas ???

Greetings Nordwind64
Posted on 2002-06-06 09:44:38 by Nordwind64
i had the same strange effect a while ago when using
threads for gfx... are you using the standard gdi functions
or DirectX? whatever, functions that helped me: GdiFlush,
InvalidateRect and the WM_ERASEBKGND msg. after a
whole night of bugfixing these effect did'nt appear again
but i don't know exactly why :)
Posted on 2002-06-06 09:54:40 by mob
Hi mob,

thank you !
I only use GDI functions...

I will try out GdiFlush and InvalidateRect.
WM_ERASEBKGND in a Dll Funktion ? Hmm...

See you,
Nordwind64
Posted on 2002-06-06 13:13:21 by Nordwind64
Ich nochmal,

ich seh' gerade, du bist ja auch aus Deutschland, also wenn dir noch was einf?llt, kannst es auch gerne in Deutsch schreiben :grin:

Gru?, Nordwind64
Posted on 2002-06-06 13:15:58 by Nordwind64
Hi again,

sorry, it won't work...
Any other ideas ?

Greetings, Nordwind64
Posted on 2002-06-06 14:22:14 by Nordwind64
Hi,

I've tested it, under Win98 the thread(s) works ok, but under WindXP there were the graphic bugs...
Is this a XP Bug ?
I only use the API's GetPixel and SetPixel in the first thread, what's the problem ?

The WinXP flag STACK_SIZE_PARAM_IS_A_RESERVATION, I could not find it in my Inc-file. Do anybody know it ?

Greetings,
Nordwind64
Posted on 2002-06-07 13:45:25 by Nordwind64
from winbase.h #define STACK_SIZE_PARAM_IS_A_RESERVATION 0x00010000 :)
Posted on 2002-06-07 13:54:26 by stryker
Thank you stryker,

but sorry, the bug is still there...

Greetings,
Nordwind64
Posted on 2002-06-07 14:23:41 by Nordwind64
Not sure if you noticed this...

On winxp, when a window locks or is busy, no redrawing occurs. In fact, when you click in the client area 'not responding' is appended to the window title. This new window is NOT the program's window. It is actually created by explorer. So maybe this is why your graphic stuff is weird?
Posted on 2002-06-07 18:37:10 by Andareed
Hi Andareed,

no sorry, that's not the problem.
I think if the thread is very very busy (have much work), the thread breaks and starts from the beginning of the thread-code.
That's the problem I think...
Any ideas ?

Greetings,
Nordwind 64
Posted on 2002-06-08 03:44:20 by Nordwind64