hi!
my prog draws something to the desktop dc, but when im running a game, it starts to flicker!
why?
do i have to draw it at the same time as the game draws?
Printable View
hi!
my prog draws something to the desktop dc, but when im running a game, it starts to flicker!
why?
do i have to draw it at the same time as the game draws?
if i set a form to allways on top, it doesnt flicker, but the things i draw on the desktopdc with setpixelv flickers
You need to use LockWindowUpdate(GetDesktopWindow) before your SetPixelV calls and then LockWindowUpdate(ByVal 0) after it.... I think. Not sure about the 2nd part, look up how to use LockWindowUpdate.
ok! thanks!
hey!
if i put LockWindowUpdate GetDesktopWindow first and LockWindowUpdate ByVal 0 after, this it what happens:
lock; drawing stuff not possible
then draw my stuff, but the DC is locked so it doesnt draw
unlock; drawing stuff is possible
if i put it in the other oder:
unlock; drawing stuff is possible
then draw my stuff
lock; drawing stuff not possible
so what happens is:
the first way, nothing happens!
the second way, my stuff is drawn but NO other things, so the screen looks the same all the time untill i press ctrl+alt+del!