<p>I'm facing a problem on the Win32 API. I have a program that, when it handles <code>WM_PAINT</code> messages, it calls <code>BeginPaint</code> to clip the region and validate the update region, but the <code>BeginPaint</code> function is always generating a <code>WM_NCPAINT</code> message with the same update region, even if the touched part that needs repainting is only inside the client region. </p>

<p>Do anyone has any clue why this is happening? It's on child windows with the <code>WS_CHILD</code> style.</p>

I guess the
```
WM_NCPAINT
```
message is always sent with the assumption that the border needs to be repainted as well!