This is a little cleaner than the first try, and probably less confusing too. Log message: Do not erase the entire window on CS_PARENTDC. If update region includes the NC area but not the client area, don't erase the client area.