Here's a start:

http://www.thescripts.com/forum/thread261633.html

You need to subclass every window and handle any WM_NCPAINT messages. You should receive a handle to the DC of the window's non-client area, which you can then paint to.