Ignore:
Timestamp:
Oct 9, 1999, 1:03:23 PM (26 years ago)
Author:
sandervl
Message:

Syscolor + button WM_ENABLE fixes

File:
1 edited

Legend:

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

    r1203 r1210  
    1 /* $Id: button.cpp,v 1.5 1999-10-08 21:23:07 cbratschi Exp $ */
     1/* $Id: button.cpp,v 1.6 1999-10-09 11:03:22 sandervl Exp $ */
    22/* File: button.cpp -- Button type widgets
    33 *
     
    2222#include "controls.h"
    2323#include "button.h"
     24#include <misc.h>
    2425
    2526//Prototypes
     
    118119  DWORD dwStyle = GetWindowLongA(hwnd,GWL_STYLE);
    119120
    120   PAINT_BUTTON(hwnd,dwStyle & 0x0f,ODA_DRAWENTIRE);
     121//  PAINT_BUTTON(hwnd,dwStyle & 0x0f,ODA_DRAWENTIRE);
     122  //SvL: 09/10/99 Force it to redraw properly
     123  InvalidateRect( hwnd, NULL, FALSE );
    121124
    122125  return 0;
     
    696699        GetWindowTextA(hwnd,text,textLen);
    697700        GetObjectA( GetSysColorBrush(COLOR_BTNFACE), sizeof(lb), &lb );
    698         if (dwStyle & WS_DISABLED &&
    699             GetSysColor(COLOR_GRAYTEXT)==lb.lbColor)
     701        if (dwStyle & WS_DISABLED && GetSysColor(COLOR_GRAYTEXT)==lb.lbColor)
     702        {
     703            dprintf(("Disable button"));
    700704            /* don't write gray text on gray background */
    701705            PaintGrayOnGray( hDC,infoPtr->hFont,&rc,text,
    702706                               DT_CENTER | DT_VCENTER );
     707        }
    703708        else
    704709        {
     710            dprintf(("Enable button"));
    705711            SetTextColor( hDC, (dwStyle & WS_DISABLED) ?
    706712                                 GetSysColor(COLOR_GRAYTEXT) :
Note: See TracChangeset for help on using the changeset viewer.