-Codechange: Add a call to GetUpdateRect() in WM_PAINT handling

see
http://msdn.microsoft.com/en-us/library/windows/desktop/dd145213%28v=vs.85%29.aspx
An application should call the GetUpdateRect function to determine
whether the window has an update region. If GetUpdateRect returns zero,
the application should not call the BeginPaint and EndPaint functions.