Changeset 327 for trunk/src/user32/new/oslibwin.cpp
- Timestamp:
- Jul 18, 1999, 3:57:48 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/oslibwin.cpp
r325 r327 1 /* $Id: oslibwin.cpp,v 1.1 0 1999-07-18 10:39:51 sandervlExp $ */1 /* $Id: oslibwin.cpp,v 1.11 1999-07-18 13:57:47 cbratschi Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 46 46 47 47 if(pszName && *pszName == 0) { 48 48 pszName = NULL; 49 49 } 50 50 if(hwndParent == 0) { … … 53 53 if(dwFrameStyle) { 54 54 dwWinStyle &= ~WS_CLIPCHILDREN; //invalid style according to docs 55 56 55 if(pszName) 56 dwFrameStyle |= FCF_TITLEBAR; 57 57 58 58 *hwndFrame = WinCreateStdWindow(hwndParent, dwWinStyle, … … 60 60 "", 0, 0, 0, &hwndClient); 61 61 if(*hwndFrame) { 62 63 64 62 if(pszName) { 63 WinSetWindowText(*hwndFrame, pszName); 64 } 65 65 return hwndClient; 66 66 } … … 161 161 //****************************************************************************** 162 162 //****************************************************************************** 163 HWND OSLibWinQueryFocus(HWND hwndDeskTop) 164 { 165 return WinQueryFocus(hwndDeskTop); 166 } 167 //****************************************************************************** 168 //****************************************************************************** 169 HWND OSLibWinWindowFromID(HWND hwndParent,ULONG id) 170 { 171 return WinWindowFromID(hwndParent,id); 172 } 173 //****************************************************************************** 174 //****************************************************************************** 175 BOOL OSLibWinSetFocus(HWND hwndDeskTop,HWND hwndNewFocus) 176 { 177 return WinSetFocus(hwndDeskTop,hwndNewFocus); 178 } 179 //****************************************************************************** 180 //****************************************************************************** 181 ULONG OSLibGetWindowHeight(HWND hwnd) 182 { 183 RECTL rect; 184 185 return (WinQueryWindowRect(hwnd,&rect)) ? rect.yTop-rect.yBottom:0; 186 } 187 //****************************************************************************** 188 //****************************************************************************** 189 BOOL OSLibWinInvalidateRect(HWND hwnd,POSRECTL pwrc,BOOL fIncludeChildren) 190 { 191 return WinInvalidateRect(hwnd,(PRECTL)pwrc,fIncludeChildren); 192 } 193 //****************************************************************************** 194 //****************************************************************************** 195 LONG OSLibWinQuerySysValue(HWND hwndDeskTop,LONG iSysValue) 196 { 197 return WinQuerySysValue(hwndDeskTop,iSysValue); 198 } 199 //****************************************************************************** 200 //****************************************************************************** 201 ULONG OSLibWinQueryDlgItemText(HWND hwndDlg,ULONG idItem,LONG cchBufferMax,char* pchBuffer) 202 { 203 return WinQueryDlgItemText(hwndDlg,idItem,cchBufferMax,pchBuffer); 204 } 205 //****************************************************************************** 206 //****************************************************************************** 207 BOOL OSLibWinSetDlgItemText(HWND hwndDlg,ULONG idItem,char* pszText) 208 { 209 return WinSetDlgItemText(hwndDlg,idItem,pszText); 210 } 211 //****************************************************************************** 212 //****************************************************************************** 213 BOOL OSLibWinQueryPointerPos(HWND hwndDeskTop,PPOINT pptlPoint) 214 { 215 return WinQueryPointerPos(hwndDeskTop,(PPOINTL)pptlPoint); 216 } 163 217 //****************************************************************************** 164 218 //****************************************************************************** … … 173 227 { 174 228 if(fl & SWP_MOVE) { 175 229 y = MapOS2ToWin32Y(hwnd, cy, y); 176 230 } 177 231 dprintf(("WinSetWindowPos %x %x %d %d %d %d %x", hwnd, hwndInsertBehind, x, y, cx, cy, fl)); … … 185 239 186 240 if(fl & SWP_SHOW) { 187 241 rc = WinShowWindow(hwnd, TRUE); 188 242 } 189 243 if(rc == 0) 190 244 dprintf(("WinShowWindow %x failed %x", hwnd, WinGetLastError(GetThreadHAB()))); 191 245 rc = WinSetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, fl); 192 246 if(rc == 0) 193 247 dprintf(("WinShowWindow %x failed %x", hwnd, WinGetLastError(GetThreadHAB()))); 194 248 return rc; 195 249 } … … 202 256 //****************************************************************************** 203 257 //****************************************************************************** 204 BOOL OSLibWinQueryUpdateRect(HWND hwnd, PRECT pRect) 205 { 206 BOOL rc; 207 RECTLOS2 rectl; 208 209 rc = WinQueryUpdateRect(hwnd, (PRECTL)&rectl); 210 if(rc) { 211 MapOS2ToWin32Rectl(hwnd, &rectl, pRect); 212 } 213 return rc; 258 BOOL OSLibWinQueryUpdateRect(HWND hwnd, POSRECTL pRect) 259 { 260 return WinQueryUpdateRect(hwnd, (PRECTL)pRect); 261 //CB: caller must convert rect 214 262 } 215 263 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.