Changeset 989 for trunk/src/user32/static.cpp
- Timestamp:
- Sep 20, 1999, 6:04:44 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/static.cpp
r949 r989 1 /* $Id: static.cpp,v 1. 1 1999-09-15 23:18:55 sandervlExp $ */1 /* $Id: static.cpp,v 1.2 1999-09-20 16:04:44 cbratschi Exp $ */ 2 2 /* 3 3 * Static control … … 92 92 93 93 if (hBitmap && GetObjectType(hBitmap) != OBJ_BITMAP) { 94 95 94 //ERR("huh? hBitmap!=0, but not bitmap\n"); 95 return 0; 96 96 } 97 97 hOldBitmap = infoPtr->hIcon; … … 102 102 GetObjectA(hBitmap, sizeof(bm), &bm); 103 103 SetWindowPos( hwnd, 0, 0, 0, bm.bmWidth, bm.bmHeight, 104 104 SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER ); 105 105 /* CB: alternative code, if necessary 106 106 HDC hdc = GetDC(hwnd); … … 113 113 } 114 114 ReleaseDC(hwnd,hdc); 115 */ 116 115 */ 116 117 117 } 118 118 return hOldBitmap; … … 471 471 text = (char*)malloc(textLen); 472 472 GetWindowTextA(hwnd,text,textLen); 473 SetBkMode(hdc,TRANSPARENT); 473 474 DrawTextA( hdc, text, -1, &rc, wFormat ); 474 475 free(text); … … 545 546 if (infoPtr->hIcon) { 546 547 BITMAP bm; 547 548 SIZE sz; 548 549 549 550 if(GetObjectType(infoPtr->hIcon) != OBJ_BITMAP) 550 551 return; 551 552 if (!(hMemDC = CreateCompatibleDC( hdc ))) return; 552 553 554 555 556 557 558 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); 559 560 } 560 561 }
Note:
See TracChangeset
for help on using the changeset viewer.