Ignore:
Timestamp:
Oct 22, 2000, 12:01:34 PM (25 years ago)
Author:
sandervl
Message:

Paint fix for static controls

File:
1 edited

Legend:

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

    r3153 r4512  
    1 /* $Id: static.cpp,v 1.19 2000-03-18 16:13:37 cbratschi Exp $ */
     1/* $Id: static.cpp,v 1.20 2000-10-22 10:01:34 sandervl Exp $ */
    22/*
    33 * Static control
     
    613613
    614614    if (infoPtr->hFont) SelectObject( hdc, infoPtr->hFont );
     615//SvL: This is what the latest Wine code does. Fixes the common color dialog
     616#if 1
     617    if ((dwStyle & SS_NOPREFIX) || ((dwStyle & SS_TYPEMASK) != SS_SIMPLE))
     618    {
     619        hBrush = SendMessageA( GetParent(hwnd), WM_CTLCOLORSTATIC,
     620                             hdc, hwnd );
     621        if (!hBrush) hBrush = GetStockObject(WHITE_BRUSH);
     622        FillRect( hdc, &rc, hBrush );   
     623    }
     624#else
    615625    hBrush = SendMessageA( GetParent(hwnd), WM_CTLCOLORSTATIC,
    616626                             hdc, hwnd );
    617627    if (!hBrush) hBrush = GetStockObject(WHITE_BRUSH);
    618628    FillRect( hdc, &rc, hBrush );
     629#endif
    619630
    620631    if (!IsWindowEnabled(hwnd)) SetTextColor(hdc,GetSysColor(COLOR_GRAYTEXT));
Note: See TracChangeset for help on using the changeset viewer.