Changeset 11799


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

Syscolor + button WM_ENABLE fixes

Location:
tags/trunk/src/user32
Files:
3 edited

Legend:

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

    r11792 r11799  
    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) :
  • TabularUnified tags/trunk/src/user32/pmwindow.cpp

    r11775 r11799  
    1 /* $Id: pmwindow.cpp,v 1.22 1999-10-08 14:57:17 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.23 1999-10-09 11:03:23 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    220220    case WM_ENABLE:
    221221        dprintf(("OS2: WM_ENABLE %x", hwnd));
    222         if(win32wnd->MsgEnable((ULONG)mp1)) {
     222        if(win32wnd->MsgEnable(SHORT1FROMMP(mp1))) {
    223223                goto RunDefWndProc;
    224224        }
  • TabularUnified tags/trunk/src/user32/syscolor.cpp

    r11729 r11799  
    1 /* $Id: syscolor.cpp,v 1.8 1999-10-05 16:53:49 cbratschi Exp $ */
     1/* $Id: syscolor.cpp,v 1.9 1999-10-09 11:03:23 sandervl Exp $ */
    22
    33/*
     
    2121#include "user32.h"
    2222#include "syscolor.h"
     23
     24//SvL: Open32 colors are much better than those in the table below
     25#define NUM_OPEN32_SYSCOLORS 21
    2326
    2427#define NUM_SYS_COLORS     (COLOR_GRADIENTINACTIVECAPTION+1)
     
    107110
    108111  SYSCOLOR_Load();
    109   for (x = 0;x < NUM_SYS_COLORS;x++) SYSCOLOR_SetColor(x,SysColors[x]);
     112  for (x = 0;x < NUM_SYS_COLORS;x++) {
     113        if(x < NUM_OPEN32_SYSCOLORS)
     114                SYSCOLOR_SetColor(x,O32_GetSysColor(x));
     115        else    SYSCOLOR_SetColor(x,SysColors[x]);
     116  }
    110117}
    111118//******************************************************************************
     
    119126  }
    120127
    121   if (nIndex >= 0 && nIndex < NUM_SYS_COLORS) return SysColors[nIndex];
     128  if (nIndex >= 0 && nIndex < NUM_SYS_COLORS)
     129  {
     130        if(nIndex < NUM_OPEN32_SYSCOLORS)
     131                return O32_GetSysColor(nIndex);
     132        else    return SysColors[nIndex];
     133  }
    122134  else return 0;
    123135}
     
    138150    WriteLog("OS2SetSysColors\n");
    139151#endif
     152   
     153    O32_SetSysColors(nChanges, lpSysColor, lpColorValues);
    140154
    141155    for(i=0;i<nChanges;i++) {
Note: See TracChangeset for help on using the changeset viewer.