Changeset 992 for trunk/src/user32/static.cpp
- Timestamp:
- Sep 20, 1999, 9:17:58 PM (26 years ago)
- 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 cbratschiExp $ */1 /* $Id: static.cpp,v 1.3 1999-09-20 19:17:58 sandervl 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);474 473 DrawTextA( hdc, text, -1, &rc, wFormat ); 475 474 free(text); … … 546 545 if (infoPtr->hIcon) { 547 546 BITMAP bm; 548 547 SIZE sz; 549 548 550 549 if(GetObjectType(infoPtr->hIcon) != OBJ_BITMAP) 551 550 return; 552 551 if (!(hMemDC = CreateCompatibleDC( hdc ))) return; 553 554 555 556 557 558 559 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); 560 559 } 561 560 }
Note:
See TracChangeset
for help on using the changeset viewer.