Ignore:
Timestamp:
Oct 8, 1999, 11:26:08 PM (26 years ago)
Author:
cbratschi
Message:

merged with WINE, other fixes

File:
1 edited

Legend:

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

    r992 r1203  
    1 /* $Id: static.cpp,v 1.3 1999-09-20 19:17:58 sandervl Exp $ */
     1/* $Id: static.cpp,v 1.4 1999-10-08 21:26:08 cbratschi Exp $ */
    22/*
    33 * Static control
     
    77 * Copyright  David W. Metcalfe, 1993
    88 *
     9 * WINE version: 990923
    910 */
    1011
     
    9293
    9394    if (hBitmap && GetObjectType(hBitmap) != OBJ_BITMAP) {
    94         //ERR("huh? hBitmap!=0, but not bitmap\n");
    95         return 0;
     95        //ERR("huh? hBitmap!=0, but not bitmap\n");
     96        return 0;
    9697    }
    9798    hOldBitmap = infoPtr->hIcon;
     
    102103        GetObjectA(hBitmap, sizeof(bm), &bm);
    103104        SetWindowPos( hwnd, 0, 0, 0, bm.bmWidth, bm.bmHeight,
    104                       SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER );
     105                      SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER );
    105106/* CB: alternative code, if necessary
    106107      HDC hdc = GetDC(hwnd);
     
    113114      }
    114115      ReleaseDC(hwnd,hdc);
    115 */                     
    116                
     116*/
     117
    117118    }
    118119    return hOldBitmap;
     
    463464    FillRect( hdc, &rc, hBrush );
    464465
     466    if (!IsWindowEnabled(hwnd)) SetTextColor(hdc,GetSysColor(COLOR_GRAYTEXT));
     467
    465468    textLen = GetWindowTextLengthA(hwnd);
    466469    if (textLen > 0)
     
    545548    if (infoPtr->hIcon) {
    546549        BITMAP bm;
    547         SIZE sz;
     550        SIZE sz;
    548551
    549552        if(GetObjectType(infoPtr->hIcon) != OBJ_BITMAP)
    550             return;
     553            return;
    551554        if (!(hMemDC = CreateCompatibleDC( hdc ))) return;
    552         GetObjectA(infoPtr->hIcon, sizeof(bm), &bm);
    553         GetBitmapDimensionEx(infoPtr->hIcon, &sz);
    554         oldbitmap = SelectObject(hMemDC, infoPtr->hIcon);
    555         BitBlt(hdc, sz.cx, sz.cy, bm.bmWidth, bm.bmHeight, hMemDC, 0, 0,
    556                SRCCOPY);
    557         SelectObject(hMemDC, oldbitmap);
    558         DeleteDC(hMemDC);
     555        GetObjectA(infoPtr->hIcon, sizeof(bm), &bm);
     556        GetBitmapDimensionEx(infoPtr->hIcon, &sz);
     557        oldbitmap = SelectObject(hMemDC, infoPtr->hIcon);
     558        BitBlt(hdc, sz.cx, sz.cy, bm.bmWidth, bm.bmHeight, hMemDC, 0, 0,
     559               SRCCOPY);
     560        SelectObject(hMemDC, oldbitmap);
     561        DeleteDC(hMemDC);
    559562    }
    560563}
Note: See TracChangeset for help on using the changeset viewer.