Ignore:
Timestamp:
Sep 20, 1999, 9:17:58 PM (26 years ago)
Author:
sandervl
Message:

Fixes for incorrect background color for button, group & static text

File:
1 edited

Legend:

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

    r989 r992  
    1 /* $Id: static.cpp,v 1.2 1999-09-20 16:04:44 cbratschi Exp $ */
     1/* $Id: static.cpp,v 1.3 1999-09-20 19:17:58 sandervl Exp $ */
    22/*
    33 * Static control
     
    9292
    9393    if (hBitmap && GetObjectType(hBitmap) != OBJ_BITMAP) {
    94         //ERR("huh? hBitmap!=0, but not bitmap\n");
    95         return 0;
     94        //ERR("huh? hBitmap!=0, but not bitmap\n");
     95        return 0;
    9696    }
    9797    hOldBitmap = infoPtr->hIcon;
     
    102102        GetObjectA(hBitmap, sizeof(bm), &bm);
    103103        SetWindowPos( hwnd, 0, 0, 0, bm.bmWidth, bm.bmHeight,
    104                       SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER );
     104                      SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER );
    105105/* CB: alternative code, if necessary
    106106      HDC hdc = GetDC(hwnd);
     
    113113      }
    114114      ReleaseDC(hwnd,hdc);
    115 */
    116 
     115*/                     
     116               
    117117    }
    118118    return hOldBitmap;
     
    471471      text = (char*)malloc(textLen);
    472472      GetWindowTextA(hwnd,text,textLen);
    473       SetBkMode(hdc,TRANSPARENT);
    474473      DrawTextA( hdc, text, -1, &rc, wFormat );
    475474      free(text);
     
    546545    if (infoPtr->hIcon) {
    547546        BITMAP bm;
    548         SIZE sz;
     547        SIZE sz;
    549548
    550549        if(GetObjectType(infoPtr->hIcon) != OBJ_BITMAP)
    551             return;
     550            return;
    552551        if (!(hMemDC = CreateCompatibleDC( hdc ))) return;
    553         GetObjectA(infoPtr->hIcon, sizeof(bm), &bm);
    554         GetBitmapDimensionEx(infoPtr->hIcon, &sz);
    555         oldbitmap = SelectObject(hMemDC, infoPtr->hIcon);
    556         BitBlt(hdc, sz.cx, sz.cy, bm.bmWidth, bm.bmHeight, hMemDC, 0, 0,
    557                SRCCOPY);
    558         SelectObject(hMemDC, oldbitmap);
    559         DeleteDC(hMemDC);
     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);
    560559    }
    561560}
Note: See TracChangeset for help on using the changeset viewer.