Ignore:
Timestamp:
Aug 22, 1999, 10:30:53 AM (26 years ago)
Author:
sandervl
Message:

Erase background changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/new/win32wnd.cpp

    r601 r614  
    1 /* $Id: win32wnd.cpp,v 1.26 1999-08-20 20:09:51 sandervl Exp $ */
     1/* $Id: win32wnd.cpp,v 1.27 1999-08-22 08:30:52 sandervl Exp $ */
    22/*
    33 * Win32 Window Code for OS/2
     
    924924}
    925925//******************************************************************************
    926 //******************************************************************************
    927 ULONG Win32Window::MsgEraseBackGround(ULONG hps)
     926//TODO: Is the clipper region of the window DC equal to the invalidated rectangle?
     927//      (or are we simply erasing too much here)
     928//******************************************************************************
     929ULONG Win32Window::MsgEraseBackGround()
    928930{
    929931    if(isIcon) {
    930             return SendInternalMessageA(WM_ICONERASEBKGND, hps, 0);
    931     }
    932     else    return SendInternalMessageA(WM_ERASEBKGND, hps, 0);
     932            return SendInternalMessageA(WM_ICONERASEBKGND, GetDC(getWindowHandle()), 0);
     933    }
     934    else    return SendInternalMessageA(WM_ERASEBKGND, GetDC(getWindowHandle()), 0);
    933935}
    934936//******************************************************************************
     
    10331035    case WM_ERASEBKGND:
    10341036    case WM_ICONERASEBKGND:
    1035         return 0;
     1037    {
     1038      RECT rect;
     1039
     1040        if (!windowClass->getBackgroundBrush()) return 0;
     1041
     1042        /*  Since WM_ERASEBKGND may receive either a window dc or a    */
     1043        /*  client dc, the area to be erased has to be retrieved from  */
     1044        /*  the device context.                                    */
     1045        GetClipBox( (HDC)wParam, &rect );
     1046
     1047        FillRect( (HDC)wParam, &rect, windowClass->getBackgroundBrush());
     1048
     1049        return 1;
     1050    }
    10361051
    10371052    case WM_NCLBUTTONDOWN:
Note: See TracChangeset for help on using the changeset viewer.