color shift of desktop
- From: puppetmaster@xxxxxxxxxxxx
- Date: 30 Aug 2006 13:36:20 -0700
I want to programm some funny, yet simple, graphics effect which shifts
the red portion of the desktop pixels more and more red. This should
simulate a kind of "heating up" of the desktop. After many tries I have
figured out a way how to do this and it actually works. I use only
Win32 API and here is the pseudocode:
Function RedShiftScreen
Copy desktop DC into a HBITMAP (BitBlt)
Get the pixel data of the HBITMAP (GetDIBits)
Modify pixels
Set modified pixel data (SetDIBits)
Copy HBITMAP back to desktop DC (BitBlt)
End
I call my function in a loop with some sleep() in between. Each time
everthing on my desktop gets more and more red.
The problem is this is only true as long as nothing other is changing
on my desktop. If I move an open window it will be redrawn and the red
shift gets lost on this part of the screen. I can live with that except
for one window which is also part of my programm. Additionaly to the
red color shift I want to display some text on the screen (think of
temperature value). I therefore create a window thread which create a
WS_EX_TOPMOST, WS_EX_TOOLWINDOW and WS_POPUP style window at the center
of the screen. The window thread draws some text into the window and
the text will change from time to time. Obviously window thread and red
shift thread run in prallel. The problem is as soon as my text changes
the first time the window will be redrawn and all red shift of the
window get lost. At the moment I cannot figure out any way how to
prevent this. May there's anyone out there which has a clue :)
.
- Follow-Ups:
- Re: color shift of desktop
- From: Mike D Sutton
- Re: color shift of desktop
- From: Gary Chanson
- Re: color shift of desktop
- Prev by Date: Re: StretchBlt speed question - why slower at higher zooms?
- Next by Date: Re: How to program to capture an extended active windows to a image
- Previous by thread: "Secondary Only" display driver
- Next by thread: Re: color shift of desktop
- Index(es):
Relevant Pages
|
Loading