[RFC] Pager: why do we implement WM_NCPAINT instead of WM_PAINT?

Robert Shearman rob at codeweavers.com
Wed Mar 23 23:48:29 CST 2005

Dimitrie O. Paun wrote:

>Hi folks,
>Does anyone know why the Pager common control (dlls/comctl32/pager.c)
>implements WM_NCPAINT instead of WM_PAINT? It is the only exception
>to the rule, all other controls implement WM_PAINT.

We need to scroll a child window. In order to do this we move the child 
window in the controls client area, using the clipping region that is 
automatically set around the client area. As the entire client area now 
consists of the child window, we must allocate space (WM_NCCALCSIZE) for 
the buttons and draw them as a non-client area (WM_NCPAINT).
This is all off the top of my head. I hope it makes sense.


More information about the wine-devel mailing list