|
-
Nov 25th, 2002, 11:36 PM
#1
Thread Starter
Frenzied Member
Why is desktop dc flickering?
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?
Last edited by cyborg; Nov 26th, 2002 at 12:07 AM.
-
Nov 25th, 2002, 11:57 PM
#2
Thread Starter
Frenzied Member
if i set a form to allways on top, it doesnt flicker, but the things i draw on the desktopdc with setpixelv flickers
-
Nov 26th, 2002, 12:17 AM
#3
Good Ol' Platypus
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.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Nov 26th, 2002, 12:30 AM
#4
Thread Starter
Frenzied Member
-
Nov 26th, 2002, 01:44 AM
#5
Thread Starter
Frenzied Member
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!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|