- Timestamp:
- Jul 4, 2001, 11:55:18 AM (24 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/oslibres.cpp
r5728 r6168 1 /* $Id: oslibres.cpp,v 1.1 4 2001-05-17 11:25:48sandervl Exp $ */1 /* $Id: oslibres.cpp,v 1.15 2001-07-04 09:55:17 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 46 46 else return 0; 47 47 } 48 #if 0 48 49 //****************************************************************************** 49 50 //TODO: change search method for icon array (cxDesired, cyDesired) … … 228 229 return hPointer; 229 230 } 231 #endif 230 232 //****************************************************************************** 231 233 //NOTE: Depends on origin of bitmap data!!! 232 234 // Assumes 1 bpp bitmaps have a top left origin and all others have a bottom left origin 233 235 //****************************************************************************** 234 HANDLE OSLibWinCreateCursor(CURSORICONINFO *pInfo, char *pAndBits, BITMAP_W *pAndBmp, char *pXorBits, BITMAP_W *pXorBmp) 236 HANDLE OSLibWinCreatePointer(CURSORICONINFO *pInfo, char *pAndBits, BITMAP_W *pAndBmp, char *pXorBits, 237 BITMAP_W *pXorBmp, BOOL fCursor) 235 238 { 236 239 POINTERINFO pointerInfo = {0}; … … 338 341 } 339 342 340 pointerInfo.fPointer = TRUE;343 pointerInfo.fPointer = fCursor; //FALSE = icon 341 344 pointerInfo.xHotspot = pInfo->ptHotSpot.x; 342 345 pointerInfo.yHotspot = mapY(pInfo->nHeight, pInfo->ptHotSpot.y); -
trunk/src/user32/oslibres.h
r5728 r6168 1 /* $Id: oslibres.h,v 1. 8 2001-05-17 11:25:48sandervl Exp $ */1 /* $Id: oslibres.h,v 1.9 2001-07-04 09:55:17 sandervl Exp $ */ 2 2 /* 3 3 * Window GUI resource wrapper functions for OS/2 … … 41 41 42 42 HANDLE OSLibWinSetAccelTable(HWND hwnd, HANDLE hAccel, PVOID acceltemplate); 43 HANDLE OSLibWinCreateIcon(PVOID iconbitmap, ULONG cxDesired, ULONG cyDesired);44 43 45 //NOTE: Depends on origin of bitmap data!!! 46 // Assumes 1 bpp bitmaps have a top left origin and all others have a bottom left origin 47 HANDLE OSLibWinCreatePointer(PVOID cursorbitmap, ULONG cxDesired, ULONG cyDesired); 48 49 HANDLE OSLibWinCreateCursor(CURSORICONINFO *pInfo, char *pAndBits, BITMAP_W *pAndBmp, char *pXorBits, BITMAP_W *pXorBmp); 44 HANDLE OSLibWinCreatePointer(CURSORICONINFO *pInfo, char *pAndBits, BITMAP_W *pAndBmp, char *pXorBits, BITMAP_W *pXorBmp, BOOL fCursor); 50 45 HANDLE OSLibWinQuerySysPointer(ULONG type,INT w,INT h); 51 46 HANDLE OSLibWinQuerySysIcon(ULONG type,INT w,INT h); -
trunk/src/user32/oslibwin.cpp
r6156 r6168 1 /* $Id: oslibwin.cpp,v 1.10 4 2001-07-03 18:33:26sandervl Exp $ */1 /* $Id: oslibwin.cpp,v 1.105 2001-07-04 09:55:17 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 21 21 #include <win32type.h> 22 22 #include <winconst.h> 23 #include <winuser32.h> 23 24 #include "oslibwin.h" 24 25 #include "oslibutil.h" … … 494 495 BOOL OSLibWinSetIcon(HWND hwnd, HANDLE hIcon) 495 496 { 496 return (BOOL) WinSendMsg(hwnd, WM_SETICON, (MPARAM)hIcon, 0); 497 ULONG hIconOS2 = GetOS2Icon(hIcon); 498 if(hIconOS2) 499 return (BOOL) WinSendMsg(hwnd, WM_SETICON, (MPARAM)hIconOS2, 0); 500 return FALSE; 497 501 } 498 502 //****************************************************************************** -
trunk/src/user32/win32wbase.cpp
r6166 r6168 1 /* $Id: win32wbase.cpp,v 1.27 2 2001-07-04 09:29:51sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.273 2001-07-04 09:55:18 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 638 638 //Set icon from window or class 639 639 if (hIcon) 640 OSLibWinSetIcon(OS2Hwnd ,hIcon);640 OSLibWinSetIcon(OS2HwndFrame,hIcon); 641 641 else 642 642 if (windowClass->getIcon()) 643 OSLibWinSetIcon(OS2Hwnd ,windowClass->getIcon());643 OSLibWinSetIcon(OS2HwndFrame,windowClass->getIcon()); 644 644 645 645 /* Get class or window DC if needed */ … … 1875 1875 hIcon = (HICON)lParam; 1876 1876 if ((dwStyle & WS_CAPTION) == WS_CAPTION) 1877 OSLibWinSetIcon(OS2Hwnd ,hIcon);1877 OSLibWinSetIcon(OS2HwndFrame,hIcon); 1878 1878 } 1879 1879 } -
trunk/src/user32/winicon.cpp
r5968 r6168 1 /* $Id: winicon.cpp,v 1.2 4 2001-06-11 20:08:26sandervl Exp $ */1 /* $Id: winicon.cpp,v 1.25 2001-07-04 09:55:18 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Icon Code for OS/2 … … 209 209 dprintf(("USER32: CopyIcon %x", hIcon)); 210 210 return CURSORICON_Copy( hIcon ); 211 } 212 //****************************************************************************** 213 //****************************************************************************** 214 HICON WIN32API GetOS2Icon(HICON hIcon) 215 { 216 CURSORICONINFO *ciconinfo; 217 218 ciconinfo = (CURSORICONINFO *)GlobalLock((HGLOBAL)hIcon); 219 if (!ciconinfo) 220 return 0; 221 HICON hOS2Icon = ciconinfo->hColorBmp; 222 GlobalUnlock(hIcon); 223 return hOS2Icon; 211 224 } 212 225 /********************************************************************** … … 1074 1087 GetBitmapBits( hXorBits, sizeXor, (char *)(info + 1) + sizeAnd); 1075 1088 } 1076 if(!bIcon) { 1077 info->hColorBmp = OSLibWinCreateCursor(info, (char *)(info + 1), (LPBITMAP_W)&bmpAnd, (char *)(info + 1) + sizeAnd, (LPBITMAP_W)&bmpXor); 1078 dprintf(("Create cursor %x with OS/2 pointer handle %x", hObj, info->hColorBmp)); 1079 } 1089 info->hColorBmp = OSLibWinCreatePointer(info, (char *)(info + 1), (LPBITMAP_W)&bmpAnd, (char *)(info + 1) + sizeAnd, (LPBITMAP_W)&bmpXor, bIcon == FALSE); 1090 dprintf(("Create cursor/icon %x with OS/2 pointer handle %x", hObj, info->hColorBmp)); 1080 1091 GlobalUnlock( hObj ); 1081 1092 }
Note:
See TracChangeset
for help on using the changeset viewer.