- Timestamp:
- Aug 20, 1999, 10:09:51 PM (26 years ago)
- Location:
- trunk/src/user32/new
- Files:
-
- 1 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/loadres.cpp
r599 r601 1 /* $Id: loadres.cpp,v 1. 6 1999-08-20 15:03:41sandervl Exp $ */1 /* $Id: loadres.cpp,v 1.7 1999-08-20 20:09:50 sandervl Exp $ */ 2 2 3 3 /* … … 14 14 #include <winres.h> 15 15 #include <heapstring.h> 16 #include <oslibres.h> 16 17 17 18 //****************************************************************************** … … 72 73 HICON WIN32API LoadIconA(HINSTANCE hinst, LPCSTR lpszIcon) 73 74 { 74 HICON rc; 75 76 rc = (HICON)FindResourceA(hinst, lpszIcon, RT_ICONA); 77 dprintf(("LoadIconA (%X) returned %d\n", hinst, rc)); 78 return(rc); 75 Win32Resource *winres; 76 HICON hIcon; 77 78 hIcon = OSLibWinQuerySysIcon((ULONG)lpszIcon); 79 if(hIcon == 0) {//not a system icon 80 winres = (Win32Resource *)FindResourceA(hinst, lpszIcon, RT_ICONA); 81 if(winres == 0) { 82 winres = (Win32Resource *)FindResourceA(hinst, lpszIcon, RT_GROUP_ICONA); 83 } 84 if(winres) { 85 hIcon = OSLibWinCreateIcon(winres->lockOS2Resource()); 86 delete winres; 87 } 88 } 89 dprintf(("LoadIconA (%X) returned %x\n", hinst, hIcon)); 90 91 return(hIcon); 79 92 } 80 93 //****************************************************************************** … … 82 95 HICON WIN32API LoadIconW(HINSTANCE hinst, LPCWSTR lpszIcon) 83 96 { 84 HICON rc; 85 86 rc = (HICON)FindResourceW(hinst, lpszIcon, RT_ICONW); 87 dprintf(("LoadIconW (%X) returned %d\n", hinst, rc)); 88 return(rc); 97 Win32Resource *winres; 98 HICON hIcon; 99 100 hIcon = OSLibWinQuerySysIcon((ULONG)lpszIcon); 101 if(hIcon == 0) {//not a system icon 102 winres = (Win32Resource *)FindResourceW(hinst, lpszIcon, RT_ICONW); 103 if(winres == 0) { 104 winres = (Win32Resource *)FindResourceW(hinst, lpszIcon, RT_GROUP_ICONW); 105 } 106 if(winres) { 107 hIcon = OSLibWinCreateIcon(winres->lockOS2Resource()); 108 delete winres; 109 } 110 } 111 dprintf(("LoadIconW (%X) returned %x\n", hinst, hIcon)); 112 113 return(hIcon); 89 114 } 90 115 //****************************************************************************** … … 92 117 HCURSOR WIN32API LoadCursorA(HINSTANCE hinst, LPCSTR lpszCursor) 93 118 { 94 HCURSOR rc; 95 96 if((int)lpszCursor >> 16 != 0) {//convert string name identifier to numeric id 97 dprintf(("LoadCursor %s\n", lpszCursor)); 98 lpszCursor = (LPCSTR)ConvertNameId(hinst, (char *)lpszCursor); 99 } 100 else dprintf(("LoadCursor %d\n", (int)lpszCursor)); 101 102 rc = O32_LoadCursor(hinst, lpszCursor); 103 104 dprintf(("LoadCursor from %X returned %d\n", hinst, rc)); 105 return(rc); 119 Win32Resource *winres; 120 HCURSOR hCursor; 121 122 hCursor = OSLibWinQuerySysPointer((ULONG)lpszCursor); 123 if(hCursor == 0) {//not a system pointer 124 winres = (Win32Resource *)FindResourceA(hinst, lpszCursor, RT_CURSORA); 125 if(winres == 0) { 126 winres = (Win32Resource *)FindResourceA(hinst, lpszCursor, RT_GROUP_CURSORA); 127 } 128 if(winres) { 129 hCursor = OSLibWinCreatePointer(winres->lockOS2Resource()); 130 delete winres; 131 } 132 } 133 dprintf(("LoadCursorA (%X) returned %x\n", hinst, hCursor)); 134 135 return(hCursor); 136 } 137 //****************************************************************************** 138 //****************************************************************************** 139 HCURSOR WIN32API LoadCursorW(HINSTANCE hinst, LPCWSTR lpszCursor) 140 { 141 Win32Resource *winres; 142 HCURSOR hCursor; 143 144 hCursor = OSLibWinQuerySysPointer((ULONG)lpszCursor); 145 if(hCursor == 0) {//not a system pointer 146 winres = (Win32Resource *)FindResourceW(hinst, lpszCursor, RT_CURSORW); 147 if(winres == 0) { 148 winres = (Win32Resource *)FindResourceW(hinst, lpszCursor, RT_GROUP_CURSORW); 149 } 150 if(winres) { 151 hCursor = OSLibWinCreatePointer(winres->lockOS2Resource()); 152 delete winres; 153 } 154 } 155 dprintf(("LoadCursorW (%X) returned %x\n", hinst, hCursor)); 156 157 return(hCursor); 106 158 } 107 159 //****************************************************************************** … … 111 163 HBITMAP rc; 112 164 113 if((int)lpszBitmap >> 16 != 0) 114 { //convert string name identifier to numeric id 115 dprintf(("lpszBitmap [%s]\n", 116 lpszBitmap)); 165 if(HIWORD(lpszBitmap) != 0) 166 { //convert string name identifier to numeric id 167 dprintf(("lpszBitmap [%s]\n", lpszBitmap)); 117 168 118 lpszBitmap = (LPCSTR)ConvertNameId(hinst, 119 (char *)lpszBitmap); 169 lpszBitmap = (LPCSTR)ConvertNameId(hinst, (char *)lpszBitmap); 120 170 } 121 else 122 dprintf(("lpszBitmap %08xh\n", 123 (int)lpszBitmap)); 171 else dprintf(("lpszBitmap %08xh\n", (int)lpszBitmap)); 124 172 125 173 rc = O32_LoadBitmap(hinst, lpszBitmap); 126 174 127 dprintf(("LoadBitmapA returned %08xh\n", 128 rc)); 175 dprintf(("LoadBitmapA returned %08xh\n", rc)); 129 176 130 177 return(rc); … … 137 184 HBITMAP rc; 138 185 139 if( (int)lpszBitmap >> 16!= 0) {//convert string name identifier to numeric id186 if(HIWORD(lpszBitmap) != 0) {//convert string name identifier to numeric id 140 187 astring = UnicodeToAsciiString((LPWSTR)lpszBitmap); 141 188 dprintf(("lpszBitmap %s\n", astring)); … … 153 200 } 154 201 //****************************************************************************** 155 //******************************************************************************156 HCURSOR WIN32API LoadCursorW(HINSTANCE hinst, LPCWSTR lpszCursor)157 {158 char *astring = NULL;159 HCURSOR rc;160 161 if((int)lpszCursor >> 16 != 0) {//convert string name identifier to numeric id162 astring = UnicodeToAsciiString((LPWSTR)lpszCursor);163 dprintf(("lpszCursor %s\n", astring));164 lpszCursor = (LPWSTR)ConvertNameId(hinst, (char *)astring);165 }166 else dprintf(("lpszCursor %d\n", (int)lpszCursor));167 168 rc = O32_LoadCursor(hinst, (char *)lpszCursor);169 if(astring)170 FreeAsciiString(astring);171 172 dprintf(("LoadCursorW returned %d\n", rc));173 return(rc);174 }175 //******************************************************************************176 202 //TODO: Far from complete, but works for loading resources from exe 177 203 //fuLoad flag ignored … … 182 208 HANDLE hRet = 0; 183 209 184 dprintf((" OS2LoadImageA NOT COMPLETE (%d,%d)\n", cxDesired, cyDesired));210 dprintf(("LoadImageA NOT COMPLETE (%d,%d)\n", cxDesired, cyDesired)); 185 211 186 212 switch(uType) { … … 194 220 hRet = (HANDLE)LoadIconA(hinst, lpszName); 195 221 break; 222 default: 223 dprintf(("LoadImageA: unsupported type %d!!", uType)); 224 return 0; 196 225 } 197 dprintf((" OS2LoadImageA returned %d\n", (int)hRet));226 dprintf(("LoadImageA returned %d\n", (int)hRet)); 198 227 199 228 return(hRet); … … 206 235 HANDLE hRet = 0; 207 236 208 dprintf((" OS2LoadImageW NOT COMPLETE (%d,%d)\n", cxDesired, cyDesired));237 dprintf(("LoadImageW NOT COMPLETE (%d,%d)\n", cxDesired, cyDesired)); 209 238 210 239 switch(uType) { … … 218 247 hRet = (HANDLE)LoadIconW(hinst, lpszName); 219 248 break; 249 default: 250 dprintf(("LoadImageW: unsupported type %d!!", uType)); 251 return 0; 220 252 } 221 dprintf((" OS2LoadImageW returned %d\n", (int)hRet));253 dprintf(("LoadImageW returned %d\n", (int)hRet)); 222 254 223 255 return(hRet); -
trunk/src/user32/new/makefile
r596 r601 1 # $Id: makefile,v 1.2 6 1999-08-20 11:52:18sandervl Exp $1 # $Id: makefile,v 1.27 1999-08-20 20:09:51 sandervl Exp $ 2 2 3 3 # … … 103 103 win32wndchild.obj: win32wndchild.cpp win32wndchild.h 104 104 gen_object.obj: gen_object.cpp gen_object.h 105 oslibwin.obj: oslibwin.cpp oslibwin.h oslibutil.h oslibgdi.h 105 oslibwin.obj: oslibwin.cpp oslibwin.h oslibutil.h oslibgdi.h $(PDWIN32_INCLUDE)\winconst.h 106 106 oslibutil.obj: oslibutil.cpp oslibutil.h $(PDWIN32_INCLUDE)\wprocess.h oslibmsg.h 107 107 oslibmsg.obj: oslibmsg.cpp oslibmsg.h 108 108 oslibgdi.obj: oslibgdi.cpp oslibgdi.h 109 oslibres.obj: oslibres.cpp oslibwin.h oslibres.h 109 oslibres.obj: oslibres.cpp oslibwin.h oslibres.h $(PDWIN32_INCLUDE)\winconst.h 110 110 111 111 clipboard.obj: clipboard.cpp -
trunk/src/user32/new/oslibres.cpp
r397 r601 1 /* $Id: oslibres.cpp,v 1. 4 1999-07-26 09:01:33sandervl Exp $ */1 /* $Id: oslibres.cpp,v 1.5 1999-08-20 20:09:51 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 18 18 19 19 #include <misc.h> 20 #include < oslibwin.h>21 #include "oslib style.h"20 #include <winconst.h> 21 #include "oslibwin.h" 22 22 #include "oslibutil.h" 23 23 #include "oslibmsg.h" … … 51 51 } 52 52 //****************************************************************************** 53 // todo: save mask handle somewhere54 //****************************************************************************** 55 HANDLE OSLibWin SetIcon(HWND hwnd, HANDLE hIcon,PVOID iconbitmap)53 //TODO: handle single icons 54 //****************************************************************************** 55 HANDLE OSLibWinCreateIcon(PVOID iconbitmap) 56 56 { 57 57 POINTERINFO pointerInfo = {0}; … … 60 60 BITMAPFILEHEADER2 *bfh; 61 61 HPS hps; 62 HANDLE hIcon; 62 63 63 64 if(iconbitmap == NULL) { 64 dprintf(("OSLibWin SetIcon %x %x: iconbitmap == NULL!!", hwnd, hIcon));65 dprintf(("OSLibWinCreateIcon iconbitmap == NULL!!")); 65 66 return 0; 66 67 } 67 if(hIcon == 0) { 68 //skip xor/and mask 69 bfh = (BITMAPFILEHEADER2 *)((char *)&bafh->bfh2 + sizeof(RGB2)*2 + sizeof(BITMAPFILEHEADER2)); 70 hps = WinGetPS(hwnd); 71 hbmColor = GpiCreateBitmap(hps, &bfh->bmp2, CBM_INIT, 72 (char *)bafh + bfh->offBits, 73 (BITMAPINFO2 *)&bfh->bmp2); 74 if(hbmColor == GPI_ERROR) { 75 dprintf(("OSLibWinSetIcon: GpiCreateBitmap failed!")); 76 WinReleasePS(hps); 77 return 0; 78 } 79 hbmMask = GpiCreateBitmap(hps, &bafh->bfh2.bmp2, CBM_INIT, 80 (char *)bafh + bafh->bfh2.offBits, 81 (BITMAPINFO2 *)&bafh->bfh2.bmp2); 82 if(hbmMask == GPI_ERROR) { 83 dprintf(("OSLibWinSetIcon: GpiCreateBitmap hbmMask failed!")); 84 WinReleasePS(hps); 85 return 0; 86 } 87 88 pointerInfo.fPointer = FALSE; //icon 89 pointerInfo.xHotspot = bfh->xHotspot; 90 pointerInfo.yHotspot = bfh->yHotspot; 91 pointerInfo.hbmColor = hbmColor; 92 pointerInfo.hbmPointer = hbmMask; 93 hIcon = WinCreatePointerIndirect(HWND_DESKTOP, &pointerInfo); 94 if(hIcon == NULL) { 95 dprintf(("WinSetIcon: WinCreatePointerIndirect failed!")); 96 GpiDeleteBitmap(hbmMask); 97 GpiDeleteBitmap(hbmColor); 98 WinReleasePS(hps); 99 } 100 } 101 WinSendMsg(hwnd, WM_SETICON, (MPARAM)hIcon, 0); 68 //skip xor/and mask 69 bfh = (BITMAPFILEHEADER2 *)((char *)&bafh->bfh2 + sizeof(RGB2)*2 + sizeof(BITMAPFILEHEADER2)); 70 hps = WinGetPS(HWND_DESKTOP); 71 hbmColor = GpiCreateBitmap(hps, &bfh->bmp2, CBM_INIT, 72 (char *)bafh + bfh->offBits, 73 (BITMAPINFO2 *)&bfh->bmp2); 74 if(hbmColor == GPI_ERROR) { 75 dprintf(("OSLibWinCreateIcon: GpiCreateBitmap failed!")); 76 WinReleasePS(hps); 77 return 0; 78 } 79 hbmMask = GpiCreateBitmap(hps, &bafh->bfh2.bmp2, CBM_INIT, 80 (char *)bafh + bafh->bfh2.offBits, 81 (BITMAPINFO2 *)&bafh->bfh2.bmp2); 82 if(hbmMask == GPI_ERROR) { 83 dprintf(("OSLibWinCreateIcon: GpiCreateBitmap hbmMask failed!")); 84 GpiDeleteBitmap(hbmColor); 85 WinReleasePS(hps); 86 return 0; 87 } 88 89 pointerInfo.fPointer = FALSE; //icon 90 pointerInfo.xHotspot = bfh->xHotspot; 91 pointerInfo.yHotspot = bfh->yHotspot; 92 pointerInfo.hbmColor = hbmColor; 93 pointerInfo.hbmPointer = hbmMask; 94 hIcon = WinCreatePointerIndirect(HWND_DESKTOP, &pointerInfo); 95 if(hIcon == NULL) { 96 dprintf(("OSLibWinCreateIcon: WinCreatePointerIndirect failed!")); 97 } 98 GpiDeleteBitmap(hbmMask); 99 GpiDeleteBitmap(hbmColor); 102 100 WinReleasePS(hps); 103 101 return hIcon; … … 105 103 //****************************************************************************** 106 104 //****************************************************************************** 107 105 HANDLE OSLibWinCreatePointer(PVOID cursorbitmap) 106 { 107 POINTERINFO pointerInfo = {0}; 108 HBITMAP hbmColor; 109 BITMAPFILEHEADER2 *bfh = (BITMAPFILEHEADER2 *)cursorbitmap; 110 HPS hps; 111 HANDLE hPointer; 112 113 if(cursorbitmap == NULL) { 114 dprintf(("OSLibWinCreatePointer cursorbitmap == NULL!!")); 115 return 0; 116 } 117 //skip xor/and mask 118 hps = WinGetPS(HWND_DESKTOP); 119 hbmColor = GpiCreateBitmap(hps, &bfh->bmp2, CBM_INIT, 120 (char *)bfh + bfh->offBits, 121 (BITMAPINFO2 *)&bfh->bmp2); 122 if(hbmColor == GPI_ERROR) { 123 dprintf(("OSLibWinCreatePointer: GpiCreateBitmap failed!")); 124 WinReleasePS(hps); 125 return 0; 126 } 127 128 pointerInfo.fPointer = TRUE; 129 pointerInfo.xHotspot = bfh->xHotspot; 130 pointerInfo.yHotspot = bfh->yHotspot; 131 pointerInfo.hbmColor = 0; 132 pointerInfo.hbmPointer = hbmColor; 133 hPointer = WinCreatePointerIndirect(HWND_DESKTOP, &pointerInfo); 134 if(hPointer == NULL) { 135 dprintf(("OSLibWinCreatePointer: WinCreatePointerIndirect failed!")); 136 } 137 GpiDeleteBitmap(hbmColor); 138 WinReleasePS(hps); 139 return hPointer; 140 } 141 //****************************************************************************** 142 //****************************************************************************** 143 HANDLE OSLibWinQuerySysIcon(ULONG type) 144 { 145 ULONG os2type = 0; 146 147 switch(type) { 148 case IDI_APPLICATION_W: 149 os2type = SPTR_PROGRAM; 150 break; 151 case IDI_HAND_W: 152 os2type = SPTR_ICONWARNING; 153 break; 154 case IDI_QUESTION_W: 155 os2type = SPTR_ICONQUESTION; 156 break; 157 case IDI_EXCLAMATION_W: 158 os2type = SPTR_ICONWARNING; 159 break; 160 case IDI_ASTERISK_W: 161 os2type = SPTR_ICONINFORMATION; 162 break; 163 default: 164 return 0; 165 } 166 167 return WinQuerySysPointer(HWND_DESKTOP, os2type, TRUE); 168 } 169 //****************************************************************************** 170 //****************************************************************************** 171 HANDLE OSLibWinQuerySysPointer(ULONG type) 172 { 173 ULONG os2type = 0; 174 175 switch(type) { 176 case IDC_ARROW_W: 177 os2type = SPTR_ARROW; 178 break; 179 case IDC_UPARROW_W: 180 os2type = SPTR_ARROW; 181 break; 182 case IDC_IBEAM_W: 183 os2type = SPTR_TEXT; 184 break; 185 case IDC_ICON_W: 186 os2type = SPTR_PROGRAM; 187 break; 188 case IDC_NO_W: 189 os2type = SPTR_ILLEGAL; 190 break; 191 case IDC_CROSS_W: 192 os2type = SPTR_MOVE; 193 break; 194 case IDC_SIZE_W: 195 os2type = SPTR_MOVE; 196 break; 197 case IDC_SIZEALL_W: 198 os2type = SPTR_MOVE; 199 break; 200 case IDC_SIZENESW_W: 201 os2type = SPTR_SIZENESW; 202 break; 203 case IDC_SIZENS_W: 204 os2type = SPTR_SIZENS; 205 break; 206 case IDC_SIZENWSE_W: 207 os2type = SPTR_SIZENWSE; 208 break; 209 case IDC_SIZEWE_W: 210 os2type = SPTR_SIZEWE; 211 break; 212 case IDC_WAIT_W: 213 os2type = SPTR_WAIT; 214 break; 215 case IDC_APPSTARTING_W: 216 os2type = SPTR_WAIT; 217 break; 218 case IDC_HELP_W: //TODO: Create a cursor for this one 219 os2type = SPTR_WAIT; 220 break; 221 default: 222 return 0; 223 } 224 return WinQuerySysPointer(HWND_DESKTOP, os2type, TRUE); 225 } 226 //****************************************************************************** 227 //****************************************************************************** -
trunk/src/user32/new/oslibres.h
r345 r601 1 /* $Id: oslibres.h,v 1. 1 1999-07-20 15:46:53sandervl Exp $ */1 /* $Id: oslibres.h,v 1.2 1999-08-20 20:09:51 sandervl Exp $ */ 2 2 /* 3 3 * Window GUI resource wrapper functions for OS/2 … … 19 19 HWND OSLibWinCreateMenu(HWND hwndParent, PVOID menutemplate); 20 20 HANDLE OSLibWinSetAccelTable(HWND hwnd, HANDLE hAccel, PVOID acceltemplate); 21 HANDLE OSLibWinSetIcon(HWND hwnd, HANDLE hIcon, PVOID iconbitmap); 21 HANDLE OSLibWinCreateIcon(PVOID iconbitmap); 22 HANDLE OSLibWinCreatePointer(PVOID cursorbitmap); 23 HANDLE OSLibWinQuerySysPointer(ULONG type); 24 HANDLE OSLibWinQuerySysIcon(ULONG type); 22 25 23 26 #endif //__OSLIBGDI_H__ -
trunk/src/user32/new/oslibwin.cpp
r398 r601 1 /* $Id: oslibwin.cpp,v 1.2 1 1999-07-26 20:03:49sandervl Exp $ */1 /* $Id: oslibwin.cpp,v 1.22 1999-08-20 20:09:51 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 18 18 19 19 #include <misc.h> 20 #include < oslibwin.h>21 #include "oslib style.h"20 #include <winconst.h> 21 #include "oslibwin.h" 22 22 #include "oslibutil.h" 23 23 #include "oslibmsg.h" … … 87 87 88 88 /* Window styles */ 89 if(dwStyle & W INWS_MINIMIZE)89 if(dwStyle & WS_MINIMIZE_W) 90 90 *OSWinStyle |= WS_MINIMIZED; 91 91 //Done explicitely in CreateWindowExA 92 92 #if 0 93 if(dwStyle & W INWS_VISIBLE)93 if(dwStyle & WS_VISIBLE_W) 94 94 *OSWinStyle |= WS_VISIBLE; 95 95 #endif 96 if(dwStyle & W INWS_DISABLED)96 if(dwStyle & WS_DISABLED_W) 97 97 *OSWinStyle |= WS_DISABLED; 98 if(dwStyle & W INWS_CLIPSIBLINGS)98 if(dwStyle & WS_CLIPSIBLINGS_W) 99 99 *OSWinStyle |= WS_CLIPSIBLINGS; 100 if(dwStyle & W INWS_CLIPCHILDREN)100 if(dwStyle & WS_CLIPCHILDREN_W) 101 101 *OSWinStyle |= WS_CLIPCHILDREN; 102 if(dwStyle & W INWS_MAXIMIZE)102 if(dwStyle & WS_MAXIMIZE_W) 103 103 *OSWinStyle |= WS_MAXIMIZED; 104 if(dwStyle & W INWS_GROUP)104 if(dwStyle & WS_GROUP_W) 105 105 *OSWinStyle |= WS_GROUP; 106 if(dwStyle & W INWS_TABSTOP)106 if(dwStyle & WS_TABSTOP_W) 107 107 *OSWinStyle |= WS_TABSTOP; 108 108 109 if(dwStyle & W INWS_CAPTION)109 if(dwStyle & WS_CAPTION_W) 110 110 *OSFrameStyle |= FCF_TITLEBAR; 111 if(dwStyle & W INWS_DLGFRAME)111 if(dwStyle & WS_DLGFRAME_W) 112 112 *OSFrameStyle |= FCF_DLGBORDER; 113 113 else 114 if(dwStyle & W INWS_BORDER)114 if(dwStyle & WS_BORDER_W) 115 115 *OSFrameStyle |= FCF_BORDER; 116 116 117 if(dwStyle & W INWS_VSCROLL)117 if(dwStyle & WS_VSCROLL_W) 118 118 *OSFrameStyle |= FCF_VERTSCROLL; 119 if(dwStyle & W INWS_HSCROLL)119 if(dwStyle & WS_HSCROLL_W) 120 120 *OSFrameStyle |= FCF_HORZSCROLL; 121 if(dwStyle & W INWS_SYSMENU)121 if(dwStyle & WS_SYSMENU_W) 122 122 *OSFrameStyle |= FCF_SYSMENU; 123 if(dwStyle & W INWS_THICKFRAME)123 if(dwStyle & WS_THICKFRAME_W) 124 124 *OSFrameStyle |= FCF_SIZEBORDER; //?? 125 if(dwStyle & W INWS_MINIMIZEBOX)125 if(dwStyle & WS_MINIMIZEBOX_W) 126 126 *OSFrameStyle |= FCF_MINBUTTON; 127 if(dwStyle & W INWS_MAXIMIZEBOX)127 if(dwStyle & WS_MAXIMIZEBOX_W) 128 128 *OSFrameStyle |= FCF_MAXBUTTON; 129 129 130 if(dwExStyle & W INWS_EX_DLGMODALFRAME)130 if(dwExStyle & WS_EX_DLGMODALFRAME_W) 131 131 *OSFrameStyle |= FCF_DLGBORDER; 132 132 … … 381 381 //****************************************************************************** 382 382 //****************************************************************************** 383 383 BOOL OSLibWinSetIcon(HWND hwnd, HANDLE hIcon) 384 { 385 return (BOOL) WinSendMsg(hwnd, WM_SETICON, (MPARAM)hIcon, 0); 386 } 387 //****************************************************************************** 388 //****************************************************************************** 389 -
trunk/src/user32/new/oslibwin.h
r398 r601 1 /* $Id: oslibwin.h,v 1. 19 1999-07-26 20:03:49sandervl Exp $ */1 /* $Id: oslibwin.h,v 1.20 1999-08-20 20:09:51 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 211 211 212 212 BOOL OSLibWinGetBorderSize(HWND hwnd, OSLIBPOINT *pointl); 213 BOOL OSLibWinSetIcon(HWND hwnd, HANDLE hIcon); 213 214 214 215 #endif //__OSLIBWIN_H__ -
trunk/src/user32/new/win32wnd.cpp
r508 r601 1 /* $Id: win32wnd.cpp,v 1.2 5 1999-08-16 15:54:11 dengertExp $ */1 /* $Id: win32wnd.cpp,v 1.26 1999-08-20 20:09:51 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Code for OS/2 … … 1346 1346 BOOL Win32Window::SetIcon(HICON hIcon) 1347 1347 { 1348 Win32Resource *winres = (Win32Resource *)hIcon;1349 HANDLE iconhandle;1350 1351 if(HIWORD(hIcon) == 0) {1352 dprintf(("SetIcon: hIcon %x invalid", hIcon));1353 SetLastError(ERROR_INVALID_PARAMETER);1354 return FALSE;1355 }1356 1348 dprintf(("Win32Window::SetIcon %x", hIcon)); 1357 iconResource = winres; 1358 iconhandle = OSLibWinSetIcon(OS2HwndFrame, winres->getOS2Handle(), winres->lockOS2Resource()); 1359 winres->setOS2Handle(iconhandle); 1360 return(iconhandle != 0); 1349 return OSLibWinSetIcon(OS2HwndFrame, hIcon); 1361 1350 } 1362 1351 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.