Changeset 1343 for trunk/src/user32/static.cpp
- Timestamp:
- Oct 17, 1999, 9:32:05 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/static.cpp
r1203 r1343 1 /* $Id: static.cpp,v 1. 4 1999-10-08 21:26:08cbratschi Exp $ */1 /* $Id: static.cpp,v 1.5 1999-10-17 19:32:04 cbratschi Exp $ */ 2 2 /* 3 3 * Static control … … 63 63 STATICINFO *infoPtr = (STATICINFO *)GetInfoPtr(hwnd); 64 64 DWORD dwStyle = GetWindowLongA(hwnd,GWL_STYLE); 65 INT cx,cy; 65 ICONINFO ii; 66 BITMAP bmp; 66 67 67 68 if ((dwStyle & SS_TYPEMASK) != SS_ICON) return 0; … … 71 72 infoPtr->hIcon = hicon; 72 73 73 cx = GetSystemMetrics(SM_CXICON);74 cy = GetSystemMetrics(SM_CYICON);75 76 SetWindowPos(hwnd,0,0,0, cx,cy,SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER );74 GetIconInfo(hicon,&ii); 75 GetObjectA(ii.hbmColor,sizeof(BITMAP),(LPVOID)&bmp); 76 77 SetWindowPos(hwnd,0,0,0,bmp.bmWidth,bmp.bmHeight,SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER ); 77 78 78 79 return prevIcon; … … 104 105 SetWindowPos( hwnd, 0, 0, 0, bm.bmWidth, bm.bmHeight, 105 106 SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER ); 106 /* CB: alternative code, if necessary107 HDC hdc = GetDC(hwnd);108 BITMAPINFO info;109 110 ZeroMemory(&info,sizeof(info));111 if (GetDIBits(hdc,hbitmap,0,0,NULL,&info,0) != 0)112 {113 SetWindowPos(hwnd,0,0,0,info.bmiHeader.biWidth,info.bmiHeader.biHeight,SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER);114 }115 ReleaseDC(hwnd,hdc);116 */117 118 107 } 119 108 return hOldBitmap;
Note:
See TracChangeset
for help on using the changeset viewer.