Ignore:
Timestamp:
Feb 5, 2000, 5:25:00 PM (26 years ago)
Author:
sandervl
Message:

WM_ERASEBKGND changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/win32dlg.cpp

    r2469 r2663  
    1 /* $Id: win32dlg.cpp,v 1.41 2000-01-18 20:10:52 sandervl Exp $ */
     1/* $Id: win32dlg.cpp,v 1.42 2000-02-05 16:24:58 sandervl Exp $ */
    22/*
    33 * Win32 Dialog Code for OS/2
     
    2323#include "win32wdesktop.h"
    2424#include "controls.h"
     25#include "syscolor.h"
    2526
    2627#define DEFAULT_DLGFONT "9.WarpSans"
     
    696697      RECT rect;
    697698      int rc;
    698         /*  Since WM_ERASEBKGND may receive either a window dc or a    */
    699         /*  client dc, the area to be erased has to be retrieved from  */
    700         /*  the device context.                    */
    701         rc = GetClipBox( (HDC)wParam, &rect );
     699
     700        if (!windowClass || !windowClass->getBackgroundBrush()) return 0;
     701
     702//        rc = GetClipBox( (HDC)wParam, &rect );
     703        rc = GetRgnBox(hUpdateRegion, &rect);
    702704        if ((rc == SIMPLEREGION) || (rc == COMPLEXREGION))
    703             FillRect( (HDC)wParam, &rect, windowClass->getBackgroundBrush());
     705        {
     706            HBRUSH hBrush = windowClass->getBackgroundBrush();
     707
     708            if (hBrush <= (HBRUSH)(SYSCOLOR_GetLastColor()+1))
     709                hBrush = GetSysColorBrush(hBrush-1);
     710
     711//          FillRect( (HDC)wParam, &rect, hBrush);
     712                FillRgn((HDC)wParam, hUpdateRegion, hBrush);
     713        }
     714
    704715        return 1;
    705716    }
     717
    706718    case WM_NCDESTROY:
    707719          /* Free dialog heap (if created) */
Note: See TracChangeset for help on using the changeset viewer.