Question

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.

Was it helpful?

Solution

I'd check SetWindowHookEx (see: SetWindowsHookEx in C# )

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top