News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

SystemParametersInfo & screen flicker

Started by georgek01, November 27, 2009, 08:28:04 PM

Previous topic - Next topic

georgek01

Hello!

I'm using SystemParametersInfo with SPI_SETDESKWALLPAPER to automatically set a different wallpaper image every few minutes. SystemParametersInfo causes the screen to flicker though. I assume it's because this function notifies all windows that a system wide parameter has changed so they need to repaint.

I also change the desktop color to the color of the first pixel [0,0] of the image.

Is there perhaps a way of changing the wallpaper image and desktop color without the flicker?



WM_TIMER

; get path of new image and store as szImagePath
invoke SystemParametersInfo,SPI_SETDESKWALLPAPER,0,addr szImagePath,00h

; get color of first pixel of image and set desktop color
invoke SetSysColors,1,addr aSystem,addr aColor

What we have to learn to do, we learn by doing.

- ARISTOTLE (384-322 BC)