The code you gave is pretty straightforward but didn't answer my question. I did already try to paint in the nonclient area. The painting itself isn't too hard, I think. You can see it e.g. in the code of shadecap (http://www.microsoft.com/msj/0697/c0697.aspx). Also see attachment and click on the buttons, you'll see what I mean.
The problem is I don't know how to solve these bad effects.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.