views:

46

answers:

1

I'm trying to intercept/hook the WM_PAINT message of the desktop in C++. I'm currently drawing with the desktop handle, my only problem is that I'm not in sync so it might flicker.

What I basically would like is a statement where I can check on the WM_PAINT of UINT message. When this is the case, I want to do something else.

I'm going to ask it the lazy way, does anyone have this laying around in a small piece of code? Obtaining the desktop handle is done with GetDesktopWindow(); from this I want too check for WM_PAINT.

+2  A: 

I'd check SetWindowHookEx (see: http://stackoverflow.com/questions/1811383/setwindowshookex-in-c )

jdv
Ick, C# example to a 'C++' question.
Greg Domjan