Changeset 319 for trunk/src/user32/new/oslibwin.cpp
- Timestamp:
- Jul 17, 1999, 11:17:58 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/oslibwin.cpp
r314 r319 1 /* $Id: oslibwin.cpp,v 1. 4 1999-07-16 11:32:08 sandervl Exp $ */1 /* $Id: oslibwin.cpp,v 1.5 1999-07-17 09:17:58 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 14 14 #include <os2.h> 15 15 #include <os2wrap.h> 16 #include <misc.h> 16 17 #include <oslibwin.h> 17 18 #include "oslibstyle.h" 19 #include "oslibutil.h" 18 20 #include "pmwindow.h" 19 21 … … 33 35 HWND OSLibWinCreateWindow(HWND hwndParent, ULONG dwWinStyle, ULONG dwFrameStyle, 34 36 char *pszName, ULONG x, ULONG y, ULONG cx, ULONG cy, 35 HWND Owner, ULONG fHWND_BOTTOM )37 HWND Owner, ULONG fHWND_BOTTOM, HWND *hwndFrame) 36 38 { 37 39 HWND hwndClient; 38 HWND hwndFrame;39 40 RECTL rectl; 40 41 … … 42 43 hwndParent = HWND_DESKTOP; 43 44 } 44 if(WinQueryWindowRect(hwndParent, &rectl) == 0) {45 if(WinQueryWindowRect(hwndParent, &rectl) == TRUE) { 45 46 y = OS2TOWIN32POINT(rectl.yTop - rectl.yBottom, y); 46 47 } 47 48 if(dwFrameStyle) { 48 49 dwWinStyle &= ~WS_CLIPCHILDREN; //invalid style according to docs 49 hwndFrame = WinCreateStdWindow(hwndParent, dwWinStyle,50 *hwndFrame = WinCreateStdWindow(hwndParent, dwWinStyle, 50 51 &dwFrameStyle, WIN32_STDCLASS, 51 52 "", 0, 0, 0, &hwndClient) != 0; 52 if( hwndFrame) {53 if(*hwndFrame) { 53 54 if(pszName) { 54 WinSetWindowText( hwndFrame, pszName);55 WinSetWindowText(*hwndFrame, pszName); 55 56 } 56 WinSetWindowPos( hwndFrame, (fHWND_BOTTOM) ? HWND_BOTTOM :HWND_TOP,57 WinSetWindowPos(*hwndFrame, (fHWND_BOTTOM) ? HWND_BOTTOM :HWND_TOP, 57 58 x, y, cx, cy, SWP_SIZE | SWP_MOVE); 58 59 59 return hwnd Frame;60 return hwndClient; 60 61 } 62 dprintf(("OSLibWinCreateWindow: WinCreateStdWindow failed (%x)", WinGetLastError(GetThreadHAB()))); 61 63 return 0; 62 64 } 63 else returnWinCreateWindow(hwndParent, WIN32_STDCLASS, pszName, dwWinStyle, x, y, cx, cy,65 hwndClient = WinCreateWindow(hwndParent, WIN32_STDCLASS, pszName, dwWinStyle, x, y, cx, cy, 64 66 Owner, (fHWND_BOTTOM) ? HWND_BOTTOM :HWND_TOP, 0, NULL, 65 67 NULL); 68 *hwndFrame = hwndClient; 69 return hwndClient; 66 70 } 67 71 //****************************************************************************** … … 143 147 //****************************************************************************** 144 148 //****************************************************************************** 149 BOOL OSLibWinSetWindowPos(HWND hwnd, HWND hwndInsertBehind, LONG x, LONG y, LONG cx, 150 LONG cy, ULONG fl) 151 { 152 return WinSetWindowPos(hwnd, hwndInsertBehind, x, y, cx, cy, fl); 153 } 154 //****************************************************************************** 155 //****************************************************************************** 156 BOOL OSLibWinShowWindow(HWND hwnd, ULONG fl) 157 { 158 return WinSetWindowPos(hwnd, 0, 0, 0, 0, 0, fl); 159 } 160 //****************************************************************************** 161 //****************************************************************************** 162 BOOL OSLibWinDestroyWindow(HWND hwnd) 163 { 164 return WinDestroyWindow(hwnd); 165 } 166 //****************************************************************************** 167 //****************************************************************************** 168 BOOL OSLibWinQueryUpdateRect(HWND hwnd, PVOID pRect) 169 { 170 return WinQueryUpdateRect(hwnd, (RECTL *)pRect); 171 } 172 //****************************************************************************** 173 //****************************************************************************** 174 BOOL OSLibWinIsIconic(HWND hwnd) 175 { 176 SWP swp; 177 BOOL rc; 178 179 rc = WinQueryWindowPos(hwnd, &swp); 180 if(rc == FALSE) { 181 dprintf(("OSLibWinIsIconic: WinQueryWindowPos %x failed", hwnd)); 182 return FALSE; 183 } 184 185 if(swp.fl & SWP_MINIMIZE) 186 return TRUE; 187 else return FALSE; 188 } 189 //****************************************************************************** 190 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.