- Timestamp:
- Jul 18, 1999, 12:39:52 PM (26 years ago)
- Location:
- trunk/src/user32/new
- Files:
-
- 4 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/makefile
r321 r325 1 # $Id: makefile,v 1. 7 1999-07-17 11:52:22sandervl Exp $1 # $Id: makefile,v 1.8 1999-07-18 10:39:50 sandervl Exp $ 2 2 3 3 # … … 29 29 msgbox.obj window.obj windowmsg.obj windowclass.obj windlgmsg.obj \ 30 30 windowword.obj gen_object.obj oslibwin.obj win32wndchild.obj \ 31 controls.obj button.obj oslibutil.obj oslibmsg.obj 31 controls.obj button.obj oslibutil.obj oslibmsg.obj windlg.obj \ 32 winprop.obj wingdi.obj oslibgdi.obj 32 33 33 34 … … 73 74 window.obj: window.cpp win32class.h win32wnd.h win32wndchild.h 74 75 windowmsg.obj: windowmsg.cpp win32class.h win32wnd.h win32wndchild.h 76 windlg.obj: windlg.cpp win32wnd.h win32dlg.h 77 winprop.obj: winprop.cpp 78 wingdi.obj: wingdi.cpp win32wnd.h oslibgdi.h 75 79 windlgmsg.obj: windlgmsg.cpp win32class.h win32wnd.h win32dlg.h win32wndchild.h 76 80 windowclass.obj: windowclass.cpp win32class.h win32wnd.h win32wndchild.h 77 81 windowword.obj: windowword.cpp win32class.h win32wnd.h win32dlg.h win32wndchild.h 78 82 79 pmwindow.obj: pmwindow.cpp win32class.h win32wnd.h win32dlg.h pmwindow.h win32wndchild.h $(PDWIN32_INCLUDE)\wprocess.h 83 pmwindow.obj: pmwindow.cpp win32class.h win32wnd.h win32dlg.h pmwindow.h win32wndchild.h $(PDWIN32_INCLUDE)\wprocess.h oslibgdi.h 80 84 win32class.obj: win32class.cpp win32class.h win32wnd.h win32dlg.h gen_object.h oslibwin.h win32wndchild.h 81 85 win32wnd.obj: win32wnd.cpp win32class.h win32wnd.h win32dlg.h gen_object.h oslibwin.h win32wndchild.h … … 83 87 win32wndchild.obj: win32wndchild.cpp win32wndchild.h 84 88 gen_object.obj: gen_object.cpp gen_object.h 85 oslibwin.obj: oslibwin.cpp oslibwin.h oslibutil.h 89 oslibwin.obj: oslibwin.cpp oslibwin.h oslibutil.h oslibgdi.h 86 90 oslibutil.obj: oslibutil.cpp oslibutil.h $(PDWIN32_INCLUDE)\wprocess.h oslibmsg.h 87 91 oslibmsg.obj: oslibmsg.cpp oslibmsg.h 88 92 oslibgdi.obj: oslibgdi.cpp oslibgdi.h 89 93 90 94 clean: -
trunk/src/user32/new/oslibwin.cpp
r324 r325 1 /* $Id: oslibwin.cpp,v 1. 9 1999-07-17 18:30:51 sandervl Exp $ */1 /* $Id: oslibwin.cpp,v 1.10 1999-07-18 10:39:51 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 22 22 #include "oslibutil.h" 23 23 #include "oslibmsg.h" 24 #include "oslibgdi.h" 24 25 #include "pmwindow.h" 25 26 … … 41 42 { 42 43 HWND hwndClient; 43 RECTL rectl;44 44 45 45 dprintf(("WinCreateWindow %x %x %x %s", hwndParent, dwWinStyle, dwFrameStyle, pszName)); … … 53 53 if(dwFrameStyle) { 54 54 dwWinStyle &= ~WS_CLIPCHILDREN; //invalid style according to docs 55 if(pszName) 56 dwFrameStyle |= FCF_TITLEBAR; 57 55 58 *hwndFrame = WinCreateStdWindow(hwndParent, dwWinStyle, 56 59 &dwFrameStyle, WIN32_STDCLASS, 57 "", 0, 0, 0, &hwndClient) != 0;60 "", 0, 0, 0, &hwndClient); 58 61 if(*hwndFrame) { 59 60 61 62 if(pszName) { 63 WinSetWindowText(*hwndFrame, pszName); 64 } 62 65 return hwndClient; 63 66 } … … 158 161 //****************************************************************************** 159 162 //****************************************************************************** 160 LONG OSLibWinQueryWindowTextLength(HWND hwnd)161 {162 return WinQueryWindowTextLength(hwnd);163 }164 //******************************************************************************165 //******************************************************************************166 LONG OSLibWinQueryWindowText(HWND hwnd,LONG lLength,char* pun)167 {168 return WinQueryWindowText(hwnd,lLength,pun);169 }170 163 //****************************************************************************** 171 164 //****************************************************************************** … … 179 172 LONG cy, ULONG fl) 180 173 { 181 RECTL rectl;182 HWND hwndParent;183 184 174 if(fl & SWP_MOVE) { 185 y = MapOS2ToWin32Y(hwnd, y); 186 } 175 y = MapOS2ToWin32Y(hwnd, cy, y); 176 } 177 dprintf(("WinSetWindowPos %x %x %d %d %d %d %x", hwnd, hwndInsertBehind, x, y, cx, cy, fl)); 187 178 return WinSetWindowPos(hwnd, hwndInsertBehind, x, y, cx, cy, fl); 188 179 } … … 198 189 if(rc == 0) 199 190 dprintf(("WinShowWindow %x failed %x", hwnd, WinGetLastError(GetThreadHAB()))); 200 rc = WinSetWindowPos(hwnd, 0, 0, 0, 0, 0, fl);191 rc = WinSetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, fl); 201 192 if(rc == 0) 202 193 dprintf(("WinShowWindow %x failed %x", hwnd, WinGetLastError(GetThreadHAB()))); … … 211 202 //****************************************************************************** 212 203 //****************************************************************************** 213 BOOL OSLibWinQueryUpdateRect(HWND hwnd, PVOID pRect) 214 { 215 return WinQueryUpdateRect(hwnd, (RECTL *)pRect); 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; 216 214 } 217 215 //****************************************************************************** … … 296 294 //****************************************************************************** 297 295 //****************************************************************************** 298 inline ULONG OS2TOWIN32POINT(RECTL *parent, RECTL *child, ULONG y) 299 { 300 return (parent->yTop - parent->yBottom - (child->yTop - child->yBottom) - y - 1); 301 } 302 //****************************************************************************** 303 //****************************************************************************** 304 ULONG MapOS2ToWin32Y(HWND hwndChild) 305 { 306 HWND hwndParent; 307 RECTL rectParent = {0}, rectChild = {0}; 308 309 WinQueryWindowRect(hwndChild, &rectChild); 310 hwndParent = WinQueryWindow(hwndChild, QW_PARENT); 311 WinQueryWindowRect(hwndParent, &rectParent); 312 return OS2TOWIN32POINT(&rectParent, &rectChild, rectChild.yBottom); 313 } 314 //****************************************************************************** 315 //****************************************************************************** 316 ULONG MapOS2ToWin32Y(HWND hwndChild, ULONG y) 317 { 318 HWND hwndParent; 319 RECTL rectParent = {0}, rectChild = {0}; 320 321 WinQueryWindowRect(hwndChild, &rectChild); 322 hwndParent = WinQueryWindow(hwndChild, QW_PARENT); 323 WinQueryWindowRect(hwndParent, &rectParent); 324 return OS2TOWIN32POINT(&rectParent, &rectChild, y); 325 } 326 //****************************************************************************** 327 //****************************************************************************** 328 ULONG MapOS2ToWin32Y(PRECTL rectParent, PRECTL rectChild, ULONG y) 329 { 330 return OS2TOWIN32POINT(rectParent, rectChild, y); 331 } 332 //****************************************************************************** 333 //****************************************************************************** 334 ULONG MapOS2ToWin32Y(PRECTL rectParent, HWND hwndChild, ULONG y) 335 { 336 RECTL rectChild = {0}; 337 338 WinQueryWindowRect(hwndChild, &rectChild); 339 return OS2TOWIN32POINT(rectParent, &rectChild, y); 340 } 341 //****************************************************************************** 342 //****************************************************************************** 343 ULONG MapOS2ToWin32Y(HWND hwndChild, PRECTL rectChild, ULONG y) 344 { 345 HWND hwndParent; 346 RECTL rectParent = {0}; 347 348 hwndParent = WinQueryWindow(hwndChild, QW_PARENT); 349 WinQueryWindowRect(hwndParent, &rectParent); 350 return OS2TOWIN32POINT(&rectParent, rectChild, y); 351 } 352 //****************************************************************************** 353 //****************************************************************************** 296 LONG OSLibWinQueryWindowTextLength(HWND hwnd) 297 { 298 return WinQueryWindowTextLength(hwnd); 299 } 300 //****************************************************************************** 301 //****************************************************************************** 302 LONG OSLibWinQueryWindowText(HWND hwnd, LONG length, LPSTR lpsz) 303 { 304 return WinQueryWindowText(hwnd, length, lpsz); 305 } 306 //****************************************************************************** 307 //****************************************************************************** 308 BOOL OSLibWinSetWindowText(HWND hwnd, LPSTR lpsz) 309 { 310 return WinSetWindowText(hwnd, lpsz); 311 } 312 //****************************************************************************** 313 //****************************************************************************** -
trunk/src/user32/new/oslibwin.h
r324 r325 1 /* $Id: oslibwin.h,v 1. 8 1999-07-17 18:30:51 sandervl Exp $ */1 /* $Id: oslibwin.h,v 1.9 1999-07-18 10:39:51 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 36 36 BOOL OSLibWinAlarm(HWND hwndDeskTop,ULONG flStyle); 37 37 ULONG OSLibDosBeep(ULONG freg,ULONG dur); 38 LONG OSLibWinQueryWindowTextLength(HWND hwnd);39 LONG OSLibWinQueryWindowText(HWND hwnd,LONG lLength,char* pun);40 38 41 39 #define SWPOS_SIZE 0x0001 … … 63 61 64 62 BOOL OSLibWinDestroyWindow(HWND hwnd); 65 BOOL OSLibWinQueryUpdateRect(HWND hwnd, P VOID pRect); //must be RECTL pointer!63 BOOL OSLibWinQueryUpdateRect(HWND hwnd, PRECT pRect); 66 64 BOOL OSLibWinIsIconic(HWND hwnd); 67 65 BOOL OSLibWinSetActiveWindow(HWND hwnd); … … 90 88 BOOL OSLibWinGetMsg(LPMSG pMsg, HWND hwnd, UINT uMsgFilterMin, UINT uMsgFilterMax, BOOL isUnicode = FALSE); 91 89 92 93 ULONG MapOS2ToWin32Y(HWND hwndChild); 94 ULONG MapOS2ToWin32Y(HWND hwndChild, ULONG y); 95 ULONG MapOS2ToWin32Y(PRECTL rectParent, PRECTL rectChild, ULONG y); 96 ULONG MapOS2ToWin32Y(PRECTL rectParent, HWND hwndChild, ULONG y); 97 ULONG MapOS2ToWin32Y(HWND hwndChild, PRECTL rectChild, ULONG y); 90 LONG OSLibWinQueryWindowTextLength(HWND hwnd); 91 LONG OSLibWinQueryWindowText(HWND hwnd, LONG length, LPSTR lpsz); 92 BOOL OSLibWinSetWindowText(HWND hwnd, LPSTR lpsz); 98 93 99 94 #endif //__OSLIBWIN_H__ -
trunk/src/user32/new/pmwindow.cpp
r324 r325 1 /* $Id: pmwindow.cpp,v 1. 7 1999-07-17 18:30:51 sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.8 1999-07-18 10:39:51 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 23 23 #include "oslibwin.h" 24 24 #include "oslibutil.h" 25 #include "oslibgdi.h" 25 26 26 27 HMQ hmq = 0; /* Message queue handle */ … … 41 42 { 42 43 UINT error; 43 44 44 //CB: only fail on real error 45 45 error = WinGetLastError(hab) & 0xFFFF; //error code … … 164 164 case WM_MOVE: 165 165 { 166 RECTL rectChild;166 RECTLOS2 rectChild; 167 167 ULONG xParent, yParent; 168 168 169 169 dprintf(("OS2: WM_MOVE %x", hwnd)); 170 170 171 WinQueryWindowRect(hwnd, &rectChild);171 WinQueryWindowRect(hwnd, (PRECTL)&rectChild); 172 172 173 173 //Calculate position relative to parent window (real window or desktop) … … 346 346 break; 347 347 348 case WM_SETWINDOWPARAMS: 349 { 350 WNDPARAMS *wndParams = (WNDPARAMS *)mp1; 351 352 dprintf(("OS2: WM_SETWINDOWPARAMS %x", hwnd)); 353 if(wndParams->fsStatus & WPM_TEXT) { 354 if(win32wnd->MsgSetText(wndParams->pszText, wndParams->cchText)) { 355 goto RunDefWndProc; 356 } 357 } 358 goto RunDefWndProc; 359 } 360 348 361 case WM_PAINT: 349 362 dprintf(("OS2: WM_PAINT %x", hwnd)); … … 358 371 359 372 case WM_CALCVALIDRECTS: 360 case WM_SETWINDOWPARAMS:361 373 case WM_QUERYWINDOWPARAMS: 362 374 case WM_HITTEST: -
trunk/src/user32/new/user32.cpp
r322 r325 1 /* $Id: user32.cpp,v 1. 4 1999-07-17 12:49:41 cbratschiExp $ */1 /* $Id: user32.cpp,v 1.5 1999-07-18 10:39:51 sandervl Exp $ */ 2 2 3 3 /* … … 216 216 } 217 217 //****************************************************************************** 218 //******************************************************************************219 BOOL WIN32API IsDlgButtonChecked( HWND arg1, UINT arg2)220 {221 #ifdef DEBUG222 WriteLog("USER32: IsDlgButtonChecked\n");223 #endif224 //CB: get button state225 return (BOOL)SendDlgItemMessageA(arg1,arg2,BM_GETCHECK,0,0);226 }227 //******************************************************************************228 //******************************************************************************229 int WIN32API GetWindowTextLengthA( HWND arg1)230 {231 dprintf(("USER32: GetWindowTextLength\n"));232 //win32 to OS/2 handle233 //return OSLibWinQueryWindowTextLength(arg1);234 return O32_GetWindowTextLength(arg1);235 }236 //******************************************************************************237 //******************************************************************************238 int WIN32API GetWindowTextA( HWND arg1, LPSTR arg2, int arg3)239 {240 dprintf(("USER32: GetWindowTextA\n"));241 //win32 to OS/2 handle242 //return OSLibWinQueryWindowText(arg1,arg3,arg2);243 return O32_GetWindowText(arg1, arg2, arg3);244 }245 //******************************************************************************246 218 247 219 /******************************************************************* … … 264 236 //****************************************************************************** 265 237 //****************************************************************************** 266 HWND WIN32API GetNextDlgTabItem( HWND arg1, HWND arg2, BOOL arg3)267 {268 dprintf(("USER32: GetNextDlgTabItem\n"));269 //get next WS_TABSTOP270 return O32_GetNextDlgTabItem(arg1, arg2, arg3);271 }272 //******************************************************************************273 //******************************************************************************274 238 HWND WIN32API GetFocus(void) 275 239 { … … 277 241 //return OS2LibWinQueryFocus(HWND_DESKTOP); 278 242 return O32_GetFocus(); 279 }280 //******************************************************************************281 //******************************************************************************282 HWND WIN32API GetDlgItem(HWND arg1, int arg2)283 {284 HWND rc;285 //return OSLibWinWindowFromID(arg1,arg2);286 rc = O32_GetDlgItem(arg1, arg2);287 dprintf(("USER32: GetDlgItem %d returned %d\n", arg2, rc));288 return(rc);289 }290 //******************************************************************************291 //******************************************************************************292 int WIN32API GetDlgCtrlID( HWND arg1)293 {294 dprintf(("USER32: GetDlgCtrlID\n"));295 //return OSLibWinQueryWindowUShort(arg1,QWS_ID);296 //use internal ID -> DWORD297 return O32_GetDlgCtrlID(arg1);298 243 } 299 244 //****************************************************************************** … … 318 263 delete callback; 319 264 return(rc); 320 }321 //******************************************************************************322 //******************************************************************************323 BOOL WIN32API EndDialog( HWND arg1, int arg2)324 {325 BOOL rc;326 327 dprintf(("USER32: EndDialog\n"));328 //return OSLibDismissDialog(arg1,arg2);329 rc = O32_EndDialog(arg1, arg2);330 return(rc);331 265 } 332 266 //****************************************************************************** … … 361 295 //****************************************************************************** 362 296 //****************************************************************************** 363 BOOL WIN32API CheckDlgButton( HWND arg1, int arg2, UINT arg3)364 {365 #ifdef DEBUG366 WriteLog("USER32: CheckDlgButton\n");367 #endif368 //CB: set button state369 return (BOOL)SendDlgItemMessageA(arg1,arg2,BM_SETCHECK,arg3,0);370 }371 //******************************************************************************372 //******************************************************************************373 297 HWND WIN32API SetFocus( HWND arg1) 374 298 { … … 379 303 //****************************************************************************** 380 304 //****************************************************************************** 381 int WIN32API ReleaseDC( HWND arg1, HDC arg2)382 {383 #ifdef DEBUG384 WriteLog("USER32: ReleaseDC\n");385 #endif386 //return OSLibWinReleasePS(arg2);387 return O32_ReleaseDC(arg1, arg2);388 }389 //******************************************************************************390 //******************************************************************************391 305 BOOL WIN32API InvalidateRect(HWND arg1, const RECT *arg2, BOOL arg3) 392 306 { … … 412 326 //****************************************************************************** 413 327 //****************************************************************************** 414 HDC WIN32API GetDC( HWND arg1)415 {416 HDC hdc;417 418 //hdc = OSLibWinGetPS(arg1);419 hdc = O32_GetDC(arg1);420 #ifdef DEBUG421 WriteLog("USER32: GetDC of %X returns %X\n", arg1, hdc);422 #endif423 return(hdc);424 }425 //******************************************************************************426 //******************************************************************************427 HDC WIN32API GetDCEx(HWND arg1, HRGN arg2, DWORD arg3)428 {429 #ifdef DEBUG430 WriteLog("USER32: GetDCEx\n");431 #endif432 //return OSLibGetDC(arg1);433 //change values434 return O32_GetDCEx(arg1, arg2, arg3);435 }436 //******************************************************************************437 //******************************************************************************438 BOOL WIN32API EndPaint( HWND arg1, const PAINTSTRUCT * arg2)439 {440 #ifdef DEBUG441 WriteLog("USER32: EndPaint\n");442 #endif443 //return OSLibWinEndPaint(arg2->hdc);444 return O32_EndPaint(arg1, arg2);445 }446 //******************************************************************************447 //******************************************************************************448 //******************************************************************************449 //******************************************************************************450 HDC WIN32API BeginPaint(HWND arg1, PPAINTSTRUCT arg2)451 {452 dprintf(("USER32: BeginPaint %X\n", arg2));453 //return OSLibWinBeginPaint(arg1,);454 //CB: emulate455 return O32_BeginPaint(arg1, arg2);456 }457 328 //****************************************************************************** 458 329 //****************************************************************************** … … 610 481 //****************************************************************************** 611 482 //****************************************************************************** 612 UINT WIN32API GetDlgItemTextA(HWND arg1, int arg2, LPSTR arg3, UINT arg4)613 {614 UINT rc;615 616 //WinQueryDlgItemText(arg1,arg2,arg4,arg3);617 rc = O32_GetDlgItemText(arg1, arg2, arg3, arg4);618 #ifdef DEBUG619 if(rc)620 WriteLog("USER32: GetDlgItemTextA returned %s\n", arg3);621 else WriteLog("USER32: GetDlgItemTextA returned 0 (%d)\n", GetLastError());622 #endif623 return(rc);624 }625 //******************************************************************************626 //******************************************************************************627 483 int WIN32API ShowCursor( BOOL arg1) 628 484 { … … 647 503 648 504 return TRUE; 649 }650 //******************************************************************************651 //******************************************************************************652 BOOL WIN32API SetDlgItemInt( HWND arg1, int arg2, UINT arg3, BOOL arg4)653 {654 #ifdef DEBUG655 WriteLog("USER32: SetDlgItemInt\n");656 #endif657 //get item text and translate to int658 return O32_SetDlgItemInt(arg1, arg2, arg3, arg4);659 }660 //******************************************************************************661 //******************************************************************************662 BOOL WIN32API SetDlgItemTextA( HWND arg1, int arg2, LPCSTR arg3)663 {664 #ifdef DEBUG665 WriteLog("USER32: SetDlgItemText to %s\n", arg3);666 #endif667 //WinSetDlgItemText(arg1,arg2,arg3);668 return O32_SetDlgItemText(arg1, arg2, arg3);669 505 } 670 506 //****************************************************************************** … … 1000 836 //****************************************************************************** 1001 837 //****************************************************************************** 1002 int WIN32API DlgDirListA( HWND arg1, LPSTR arg2, int arg3, int arg4, UINT arg5)1003 {1004 #ifdef DEBUG1005 WriteLog("USER32: DlgDirListA\n");1006 #endif1007 return O32_DlgDirList(arg1, arg2, arg3, arg4, arg5);1008 }1009 //******************************************************************************1010 //******************************************************************************1011 int WIN32API DlgDirListComboBoxA( HWND arg1, LPSTR arg2, int arg3, int arg4, UINT arg5)1012 {1013 #ifdef DEBUG1014 WriteLog("USER32: DlgDirListComboBoxA\n");1015 #endif1016 return O32_DlgDirListComboBox(arg1, arg2, arg3, arg4, arg5);1017 }1018 //******************************************************************************1019 //******************************************************************************1020 int WIN32API DlgDirListComboBoxW( HWND arg1, LPWSTR arg2, int arg3, int arg4, UINT arg5)1021 {1022 #ifdef DEBUG1023 WriteLog("USER32: DlgDirListComboBoxW NOT WORKING\n");1024 #endif1025 // NOTE: This will not work as is (needs UNICODE support)1026 return 0;1027 // return O32_DlgDirListComboBox(arg1, arg2, arg3, arg4, arg5);1028 }1029 //******************************************************************************1030 //******************************************************************************1031 int WIN32API DlgDirListW( HWND arg1, LPWSTR arg2, int arg3, int arg4, UINT arg5)1032 {1033 #ifdef DEBUG1034 WriteLog("USER32: DlgDirListW NOT WORKING\n");1035 #endif1036 // NOTE: This will not work as is (needs UNICODE support)1037 return 0;1038 // return O32_DlgDirList(arg1, arg2, arg3, arg4, arg5);1039 }1040 //******************************************************************************1041 //******************************************************************************1042 BOOL WIN32API DlgDirSelectComboBoxExA( HWND arg1, LPSTR arg2, int arg3, int arg4)1043 {1044 #ifdef DEBUG1045 WriteLog("USER32: DlgDirSelectComboBoxExA\n");1046 #endif1047 return O32_DlgDirSelectComboBoxEx(arg1, arg2, arg3, arg4);1048 }1049 //******************************************************************************1050 //******************************************************************************1051 BOOL WIN32API DlgDirSelectComboBoxExW( HWND arg1, LPWSTR arg2, int arg3, int arg4)1052 {1053 #ifdef DEBUG1054 WriteLog("USER32: DlgDirSelectComboBoxExW NOT WORKING\n");1055 #endif1056 // NOTE: This will not work as is (needs UNICODE support)1057 return 0;1058 // return O32_DlgDirSelectComboBoxEx(arg1, arg2, arg3, arg4);1059 }1060 //******************************************************************************1061 //******************************************************************************1062 BOOL WIN32API DlgDirSelectExA( HWND arg1, LPSTR arg2, int arg3, int arg4)1063 {1064 #ifdef DEBUG1065 WriteLog("USER32: DlgDirSelectExA\n");1066 #endif1067 return O32_DlgDirSelectEx(arg1, arg2, arg3, arg4);1068 }1069 //******************************************************************************1070 //******************************************************************************1071 BOOL WIN32API DlgDirSelectExW( HWND arg1, LPWSTR arg2, int arg3, int arg4)1072 {1073 #ifdef DEBUG1074 WriteLog("USER32: DlgDirSelectExW NOT WORKING\n");1075 #endif1076 // NOTE: This will not work as is (needs UNICODE support)1077 return 0;1078 // return O32_DlgDirSelectEx(arg1, arg2, arg3, arg4);1079 }1080 //******************************************************************************1081 //******************************************************************************1082 838 BOOL WIN32API EmptyClipboard(void) 1083 839 { … … 1122 878 //****************************************************************************** 1123 879 //****************************************************************************** 1124 int WIN32API EnumPropsA(HWND arg1, PROPENUMPROCA arg2)1125 {1126 #ifdef DEBUG1127 WriteLog("USER32: EnumPropsA DOES NOT WORK\n");1128 #endif1129 //calling convention problems1130 return 0;1131 // return O32_EnumProps(arg1, (PROPENUMPROC_O32)arg2);1132 }1133 //******************************************************************************1134 //******************************************************************************1135 int WIN32API EnumPropsExA( HWND arg1, PROPENUMPROCEXA arg2, LPARAM arg3)1136 {1137 #ifdef DEBUG1138 WriteLog("USER32: EnumPropsExA DOES NOT WORK\n");1139 #endif1140 //calling convention problems1141 return 0;1142 // return O32_EnumPropsEx(arg1, arg2, (PROPENUMPROCEX_O32)arg3);1143 }1144 //******************************************************************************1145 //******************************************************************************1146 int WIN32API EnumPropsExW( HWND arg1, PROPENUMPROCEXW arg2, LPARAM arg3)1147 {1148 #ifdef DEBUG1149 WriteLog("USER32: EnumPropsExW\n");1150 #endif1151 // NOTE: This will not work as is (needs UNICODE support)1152 //calling convention problems1153 return 0;1154 // return O32_EnumPropsEx(arg1, arg2, arg3);1155 }1156 //******************************************************************************1157 //******************************************************************************1158 int WIN32API EnumPropsW( HWND arg1, PROPENUMPROCW arg2)1159 {1160 #ifdef DEBUG1161 WriteLog("USER32: EnumPropsW\n");1162 #endif1163 // NOTE: This will not work as is (needs UNICODE support)1164 //calling convention problems1165 return 0;1166 // return O32_EnumProps(arg1, arg2);1167 }1168 //******************************************************************************1169 //******************************************************************************1170 880 BOOL WIN32API EnumWindows(WNDENUMPROC lpfn, LPARAM lParam) 1171 881 { … … 1330 1040 //****************************************************************************** 1331 1041 //****************************************************************************** 1332 DWORD WIN32API GetDialogBaseUnits(void)1333 {1334 #ifdef DEBUG1335 WriteLog("USER32: GetDialogBaseUnits\n");1336 #endif1337 return O32_GetDialogBaseUnits();1338 }1339 //******************************************************************************1340 //******************************************************************************1341 UINT WIN32API GetDlgItemInt( HWND arg1, int arg2, PBOOL arg3, BOOL arg4)1342 {1343 #ifdef DEBUG1344 WriteLog("USER32: GetDlgItemInt\n");1345 #endif1346 return O32_GetDlgItemInt(arg1, arg2, arg3, arg4);1347 }1348 1349 1350 /*****************************************************************************1351 * Name : UINT WIN32API GetDlgItemTextW1352 * Purpose : Determine the text of a window control1353 * Parameters: HWND arg11354 * int arg21355 * LPWSTR arg31356 * UINT arg41357 * Variables :1358 * Result :1359 * Remark :1360 * Status : UNTESTED UNKNOWN STUB1361 *1362 * Author : Patrick Haller [Wed, 1998/06/16 11:55]1363 *****************************************************************************/1364 1365 UINT WIN32API GetDlgItemTextW(HWND arg1,1366 int arg2,1367 LPWSTR arg3,1368 UINT arg4)1369 {1370 LPSTR lpBuffer; /* temporary buffer for the ascii result */1371 UINT uiResult; /* return value of the ascii variant */1372 1373 dprintf(("USER32: GetDlgItemTextW(%08xh,%08xh,%08xh,%08xh)\n",1374 arg1,1375 arg2,1376 arg3,1377 arg4));1378 1379 1380 lpBuffer = (LPSTR)malloc(arg4); /* allocate temporary buffer */1381 uiResult = GetDlgItemTextA(arg1, /* call ascii variant */1382 arg2,1383 lpBuffer,1384 arg4);1385 1386 AsciiToUnicodeN(lpBuffer, /* now convert result to unicode */1387 arg3,1388 arg4);1389 1390 free(lpBuffer); /* free the temporary buffer */1391 1392 return (uiResult); /* OK, that's it */1393 }1394 1395 1396 //******************************************************************************1397 //******************************************************************************1398 1042 UINT WIN32API GetDoubleClickTime(void) 1399 1043 { … … 1463 1107 //****************************************************************************** 1464 1108 //****************************************************************************** 1465 HWND WIN32API GetNextDlgGroupItem( HWND arg1, HWND arg2, BOOL arg3)1466 {1467 #ifdef DEBUG1468 WriteLog("USER32: GetNextDlgGroupItem\n");1469 #endif1470 return O32_GetNextDlgGroupItem(arg1, arg2, arg3);1471 }1472 //******************************************************************************1473 //******************************************************************************1474 1109 HWND WIN32API GetOpenClipboardWindow(void) 1475 1110 { … … 1487 1122 #endif 1488 1123 return O32_GetPriorityClipboardFormat(arg1, arg2); 1489 }1490 //******************************************************************************1491 //******************************************************************************1492 HANDLE WIN32API GetPropA( HWND arg1, LPCSTR arg2)1493 {1494 #ifdef DEBUG1495 if((int)arg2 >> 16 != 0)1496 WriteLog("USER32: GetPropA %s\n", arg2);1497 else WriteLog("USER32: GetPropA %X\n", arg2);1498 #endif1499 return O32_GetProp(arg1, arg2);1500 }1501 //******************************************************************************1502 //******************************************************************************1503 HANDLE WIN32API GetPropW(HWND arg1, LPCWSTR arg2)1504 {1505 BOOL handle;1506 char *astring;1507 1508 if((int)arg2 >> 16 != 0)1509 astring = UnicodeToAsciiString((LPWSTR)arg2);1510 else astring = (char *)arg2;1511 #ifdef DEBUG1512 if((int)arg2 >> 16 != 0)1513 WriteLog("USER32: GetPropW %s\n", astring);1514 else WriteLog("USER32: GetPropW %X\n", astring);1515 #endif1516 handle = GetPropA(arg1, (LPCSTR)astring);1517 if((int)arg2 >> 16 != 0)1518 FreeAsciiString(astring);1519 1520 return(handle);1521 1124 } 1522 1125 //****************************************************************************** … … 1766 1369 //****************************************************************************** 1767 1370 //****************************************************************************** 1768 HANDLE WIN32API RemovePropA( HWND arg1, LPCSTR arg2)1769 {1770 #ifdef DEBUG1771 WriteLog("USER32: RemovePropA\n");1772 #endif1773 return O32_RemoveProp(arg1, arg2);1774 }1775 //******************************************************************************1776 //******************************************************************************1777 HANDLE WIN32API RemovePropW( HWND arg1, LPCWSTR arg2)1778 {1779 char *astring = UnicodeToAsciiString((LPWSTR)arg2);1780 HANDLE rc;1781 1782 #ifdef DEBUG1783 WriteLog("USER32: RemovePropW\n");1784 #endif1785 rc = O32_RemoveProp(arg1, astring);1786 FreeAsciiString(astring);1787 return rc;1788 }1789 //******************************************************************************1790 //******************************************************************************1791 1371 BOOL WIN32API ScreenToClient( HWND arg1, LPPOINT arg2) 1792 1372 { … … 1855 1435 //****************************************************************************** 1856 1436 //****************************************************************************** 1857 BOOL WIN32API SetDlgItemTextW( HWND arg1, int arg2, LPCWSTR arg3)1858 {1859 char *astring = UnicodeToAsciiString((LPWSTR)arg3);1860 BOOL rc;1861 1862 #ifdef DEBUG1863 WriteLog("USER32: SetDlgItemTextW\n");1864 #endif1865 // NOTE: This will not work as is (needs UNICODE support)1866 rc = O32_SetDlgItemText(arg1, arg2, astring);1867 FreeAsciiString(astring);1868 return rc;1869 }1870 //******************************************************************************1871 //******************************************************************************1872 1437 BOOL WIN32API SetDoubleClickTime( UINT arg1) 1873 1438 { … … 1876 1441 #endif 1877 1442 return O32_SetDoubleClickTime(arg1); 1878 }1879 //******************************************************************************1880 //******************************************************************************1881 BOOL WIN32API SetPropA( HWND arg1, LPCSTR arg2, HANDLE arg3)1882 {1883 #ifdef DEBUG1884 if((int)arg2 >> 16 != 0)1885 WriteLog("USER32: SetPropA %S\n", arg2);1886 else WriteLog("USER32: SetPropA %X\n", arg2);1887 #endif1888 return O32_SetProp(arg1, arg2, arg3);1889 }1890 //******************************************************************************1891 //******************************************************************************1892 BOOL WIN32API SetPropW(HWND arg1, LPCWSTR arg2, HANDLE arg3)1893 {1894 BOOL rc;1895 char *astring;1896 1897 if((int)arg2 >> 16 != 0)1898 astring = UnicodeToAsciiString((LPWSTR)arg2);1899 else astring = (char *)arg2;1900 1901 #ifdef DEBUG1902 if((int)arg2 >> 16 != 0)1903 WriteLog("USER32: SetPropW %S\n", astring);1904 else WriteLog("USER32: SetPropW %X\n", astring);1905 #endif1906 rc = O32_SetProp(arg1, astring, arg3);1907 if((int)astring >> 16 != 0)1908 FreeAsciiString(astring);1909 return(rc);1910 1443 } 1911 1444 //****************************************************************************** -
trunk/src/user32/new/win32wnd.cpp
r324 r325 1 /* $Id: win32wnd.cpp,v 1. 8 1999-07-17 18:30:51 sandervl Exp $ */1 /* $Id: win32wnd.cpp,v 1.9 1999-07-18 10:39:51 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Code for OS/2 … … 28 28 #include <oslibwin.h> 29 29 #include <oslibutil.h> 30 #include <oslibgdi.h> 30 31 31 32 #define HAS_DLGFRAME(style,exStyle) \ … … 383 384 maxPos.x = rectWindow.left; maxPos.y = rectWindow.top; 384 385 385 if( sendMessage(WM_NCCREATE, 0, (LPARAM)cs) )386 if(SendInternalMessage(WM_NCCREATE, 0, (LPARAM)cs) ) 386 387 { 387 388 SendNCCalcSize(FALSE, &rectWindow, NULL, NULL, 0, &rectClient ); … … 389 390 maxPos.y - rectWindow.top); 390 391 dprintf(("Sending WM_CREATE")); 391 if( ( sendMessage(WM_CREATE, 0, (LPARAM)cs )) != -1 )392 if( (SendInternalMessage(WM_CREATE, 0, (LPARAM)cs )) != -1 ) 392 393 { 393 394 SetWindowPos(HWND_TOP, rectClient.left, rectClient.top, … … 430 431 if( dwStyle & WS_MINIMIZE ) 431 432 { 432 if( !Send MessageA(WM_QUERYOPEN, 0, 0L ) )433 if( !SendInternalMessageA(WM_QUERYOPEN, 0, 0L ) ) 433 434 return (SWP_NOSIZE | SWP_NOMOVE); 434 435 swpFlags |= SWP_NOCOPYBITS; … … 570 571 // } 571 572 572 Send MessageA(WM_GETMINMAXINFO, 0, (LPARAM)&MinMax );573 SendInternalMessageA(WM_GETMINMAXINFO, 0, (LPARAM)&MinMax ); 573 574 574 575 /* Some sanity checks */ … … 614 615 params.lppos = &winposCopy; 615 616 } 616 result = Send MessageA(WM_NCCALCSIZE, calcValidRect,617 (LPARAM)¶ms );617 result = SendInternalMessageA(WM_NCCALCSIZE, calcValidRect, 618 (LPARAM)¶ms ); 618 619 *newClientRect = params.rgrc[0]; 619 620 return result; … … 624 625 { 625 626 OS2Hwnd = hwndOS2; 626 return Send MessageA(WM_CREATE, 0, initParam);627 return SendInternalMessageA(WM_CREATE, 0, initParam); 627 628 } 628 629 //****************************************************************************** … … 630 631 ULONG Win32Window::MsgQuit() 631 632 { 632 return Send MessageA(WM_QUIT, 0, 0);633 return SendInternalMessageA(WM_QUIT, 0, 0); 633 634 } 634 635 //****************************************************************************** … … 636 637 ULONG Win32Window::MsgClose() 637 638 { 638 return Send MessageA(WM_CLOSE, 0, 0);639 return SendInternalMessageA(WM_CLOSE, 0, 0); 639 640 } 640 641 //****************************************************************************** … … 644 645 ULONG rc; 645 646 646 rc = Send MessageA(WM_DESTROY, 0, 0);647 rc = SendInternalMessageA(WM_DESTROY, 0, 0); 647 648 delete this; 648 649 return rc; … … 652 653 ULONG Win32Window::MsgEnable(BOOL fEnable) 653 654 { 654 return Send MessageA(WM_ENABLE, fEnable, 0);655 return SendInternalMessageA(WM_ENABLE, fEnable, 0); 655 656 } 656 657 //****************************************************************************** … … 659 660 ULONG Win32Window::MsgShow(BOOL fShow) 660 661 { 661 return Send MessageA(WM_SHOWWINDOW, fShow, 0);662 return SendInternalMessageA(WM_SHOWWINDOW, fShow, 0); 662 663 } 663 664 //****************************************************************************** … … 683 684 else fwSizeType = SIZE_RESTORED; 684 685 685 return Send MessageA(WM_SIZE, fwSizeType, MAKELONG((USHORT)width, (USHORT)height));686 return SendInternalMessageA(WM_SIZE, fwSizeType, MAKELONG((USHORT)width, (USHORT)height)); 686 687 } 687 688 //****************************************************************************** … … 689 690 ULONG Win32Window::MsgActivate(BOOL fActivate, HWND hwnd) 690 691 { 691 return Send MessageA(WM_ACTIVATE, (fActivate) ? WA_ACTIVE : WA_INACTIVE, hwnd);692 return SendInternalMessageA(WM_ACTIVATE, (fActivate) ? WA_ACTIVE : WA_INACTIVE, hwnd); 692 693 } 693 694 //****************************************************************************** … … 695 696 ULONG Win32Window::MsgSetFocus(HWND hwnd) 696 697 { 697 return Send MessageA(WM_SETFOCUS, hwnd, 0);698 return SendInternalMessageA(WM_SETFOCUS, hwnd, 0); 698 699 } 699 700 //****************************************************************************** … … 701 702 ULONG Win32Window::MsgKillFocus(HWND hwnd) 702 703 { 703 return Send MessageA(WM_KILLFOCUS, hwnd, 0);704 return SendInternalMessageA(WM_KILLFOCUS, hwnd, 0); 704 705 } 705 706 //****************************************************************************** … … 732 733 return 1; 733 734 } 734 return Send MessageA(win32msg, 0, MAKELONG(x, MapOS2ToWin32Y(OS2Hwnd, y)));735 return SendInternalMessageA(win32msg, 0, MAKELONG(x, MapOS2ToWin32Y(OS2Hwnd, y))); 735 736 } 736 737 //****************************************************************************** … … 738 739 ULONG Win32Window::MsgPaint(ULONG tmp1, ULONG tmp2) 739 740 { 740 return Send MessageA(WM_PAINT, 0, 0);741 return SendInternalMessageA(WM_PAINT, 0, 0); 741 742 } 742 743 //****************************************************************************** … … 744 745 ULONG Win32Window::MsgEraseBackGround(ULONG hps) 745 746 { 746 return SendMessageA(WM_ERASEBKGND, hps, 0); 747 return SendInternalMessageA(WM_ERASEBKGND, hps, 0); 748 } 749 //****************************************************************************** 750 //****************************************************************************** 751 ULONG Win32Window::MsgSetText(LPSTR lpsz, LONG cch) 752 { 753 if(isUnicode) { 754 return SendInternalMessageW(WM_SETTEXT, 0, (LPARAM)lpsz); 755 } 756 else return SendInternalMessageA(WM_SETTEXT, 0, (LPARAM)lpsz); 747 757 } 748 758 //****************************************************************************** … … 787 797 } 788 798 //****************************************************************************** 789 //todo, unicode msgs790 799 //****************************************************************************** 791 800 LRESULT Win32Window::SendMessageW(ULONG Msg, WPARAM wParam, LPARAM lParam) … … 823 832 NotifyParent(Msg, wParam, lParam); 824 833 return win32wndproc(getWindowHandle(), WM_DESTROY, 0, 0); 834 835 default: 836 return win32wndproc(getWindowHandle(), Msg, wParam, lParam); 837 } 838 } 839 //****************************************************************************** 840 //Called as a result of an OS/2 message 841 //****************************************************************************** 842 LRESULT Win32Window::SendInternalMessageA(ULONG Msg, WPARAM wParam, LPARAM lParam) 843 { 844 if(PostSpyMessage(getWindowHandle(), Msg, wParam, lParam) == FALSE) 845 dprintf(("SendInternalMessageA %s for %x %x %x", GetMsgText(Msg), getWindowHandle(), wParam, lParam)); 846 847 if(HkCBT::OS2HkCBTProc(getWindowHandle(), Msg, wParam, lParam) == TRUE) {//hook swallowed msg 848 return(0); 849 } 850 switch(Msg) 851 { 852 case WM_CREATE: 853 { 854 if(win32wndproc(getWindowHandle(), WM_NCCREATE, 0, lParam) == 0) { 855 dprintf(("WM_NCCREATE returned FALSE\n")); 856 return(0); //don't create window 857 } 858 if(win32wndproc(getWindowHandle(), WM_CREATE, 0, lParam) == 0) { 859 dprintf(("WM_CREATE returned FALSE\n")); 860 return(0); //don't create window 861 } 862 NotifyParent(Msg, wParam, lParam); 863 864 return(1); 865 } 866 case WM_LBUTTONDOWN: 867 case WM_MBUTTONDOWN: 868 case WM_RBUTTONDOWN: 869 NotifyParent(Msg, wParam, lParam); 870 return win32wndproc(getWindowHandle(), Msg, wParam, lParam); 871 872 case WM_DESTROY: 873 win32wndproc(getWindowHandle(), WM_NCDESTROY, 0, 0); 874 NotifyParent(Msg, wParam, lParam); 875 return win32wndproc(getWindowHandle(), WM_DESTROY, 0, 0); 876 default: 877 return win32wndproc(getWindowHandle(), Msg, wParam, lParam); 878 } 879 } 880 //****************************************************************************** 881 //Called as a result of an OS/2 message 882 //todo, unicode msgs (WM_SETTEXT etc) 883 //****************************************************************************** 884 LRESULT Win32Window::SendInternalMessageW(ULONG Msg, WPARAM wParam, LPARAM lParam) 885 { 886 if(PostSpyMessage(getWindowHandle(), Msg, wParam, lParam) == FALSE) 887 dprintf(("SendInternalMessageW %s for %x %x %x", GetMsgText(Msg), getWindowHandle(), wParam, lParam)); 888 889 if(HkCBT::OS2HkCBTProc(getWindowHandle(), Msg, wParam, lParam) == TRUE) {//hook swallowed msg 890 return(0); 891 } 892 switch(Msg) 893 { 894 case WM_CREATE: 895 { 896 if(win32wndproc(getWindowHandle(), WM_NCCREATE, 0, lParam) == 0) { 897 dprintf(("WM_NCCREATE returned FALSE\n")); 898 return(0); //don't create window 899 } 900 if(win32wndproc(getWindowHandle(), WM_CREATE, 0, lParam) == 0) { 901 dprintf(("WM_CREATE returned FALSE\n")); 902 return(0); //don't create window 903 } 904 NotifyParent(Msg, wParam, lParam); 905 906 return(1); 907 } 908 case WM_LBUTTONDOWN: 909 case WM_MBUTTONDOWN: 910 case WM_RBUTTONDOWN: 911 NotifyParent(Msg, wParam, lParam); 912 return win32wndproc(getWindowHandle(), Msg, wParam, lParam); 913 914 case WM_DESTROY: 915 win32wndproc(getWindowHandle(), WM_NCDESTROY, 0, 0); 916 NotifyParent(Msg, wParam, lParam); 917 return win32wndproc(getWindowHandle(), WM_DESTROY, 0, 0); 825 918 default: 826 919 return win32wndproc(getWindowHandle(), Msg, wParam, lParam); … … 875 968 if(parentwindow) { 876 969 if(Msg == WM_CREATE || Msg == WM_DESTROY) { 877 parentwindow->Send MessageA(WM_PARENTNOTIFY, MAKEWPARAM(Msg, window->getWindowId()), (LPARAM)window->getWindowHandle());970 parentwindow->SendInternalMessageA(WM_PARENTNOTIFY, MAKEWPARAM(Msg, window->getWindowId()), (LPARAM)window->getWindowHandle()); 878 971 } 879 else parentwindow->Send MessageA(WM_PARENTNOTIFY, MAKEWPARAM(Msg, window->getWindowId()), lParam );972 else parentwindow->SendInternalMessageA(WM_PARENTNOTIFY, MAKEWPARAM(Msg, window->getWindowId()), lParam ); 880 973 } 881 974 } … … 908 1001 ULONG showstate = 0; 909 1002 1003 dprintf(("ShowWindow %x", nCmdShow)); 910 1004 switch(nCmdShow) 911 1005 { … … 942 1036 break; 943 1037 } 944 return OSLibWinShowWindow(OS2Hwnd , showstate);1038 return OSLibWinShowWindow(OS2HwndFrame, showstate); 945 1039 } 946 1040 //****************************************************************************** … … 994 1088 setstate |= SWPOS_SHOW; 995 1089 996 return OSLibWinSetWindowPos(OS2Hwnd , hwndInsertAfter, x, y, cx, cy, setstate);1090 return OSLibWinSetWindowPos(OS2HwndFrame, hwndInsertAfter, x, y, cx, cy, setstate); 997 1091 } 998 1092 //****************************************************************************** … … 1061 1155 BOOL Win32Window::UpdateWindow() 1062 1156 { 1063 RECT Lrect;1064 1065 if(OSLibWinQueryUpdateRect(OS2Hwnd, (PVOID)&rect))1157 RECT rect; 1158 1159 if(OSLibWinQueryUpdateRect(OS2Hwnd, &rect)) 1066 1160 {//update region not empty 1067 Send MessageA((isIcon) ? WM_PAINTICON : WM_PAINT, 0, 0);1161 SendInternalMessageA((isIcon) ? WM_PAINTICON : WM_PAINT, 0, 0); 1068 1162 } 1069 1163 return TRUE; … … 1181 1275 { 1182 1276 return OSLibWinIsWindowVisible(OS2Hwnd); 1277 } 1278 //****************************************************************************** 1279 //****************************************************************************** 1280 BOOL Win32Window::GetWindowRect(PRECT pRect) 1281 { 1282 // return OSLibWinIsWindowVisible(OS2Hwnd); 1283 } 1284 //****************************************************************************** 1285 //****************************************************************************** 1286 int Win32Window::GetWindowTextLengthA() 1287 { 1288 return OSLibWinQueryWindowTextLength(OS2Hwnd); 1289 } 1290 //****************************************************************************** 1291 //****************************************************************************** 1292 int Win32Window::GetWindowTextA(LPSTR lpsz, int cch) 1293 { 1294 return OSLibWinQueryWindowText(OS2Hwnd, cch, lpsz); 1295 } 1296 //****************************************************************************** 1297 //****************************************************************************** 1298 BOOL Win32Window::SetWindowTextA(LPCSTR lpsz) 1299 { 1300 return OSLibWinSetWindowText(OS2Hwnd, (LPSTR)lpsz); 1183 1301 } 1184 1302 //****************************************************************************** -
trunk/src/user32/new/win32wnd.h
r324 r325 1 /* $Id: win32wnd.h,v 1. 7 1999-07-17 18:30:52 sandervl Exp $ */1 /* $Id: win32wnd.h,v 1.8 1999-07-18 10:39:52 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Code for OS/2 … … 66 66 ULONG MsgPaint(ULONG tmp1, ULONG tmp2); 67 67 ULONG MsgEraseBackGround(ULONG hps); 68 ULONG MsgSetText(LPSTR lpsz, LONG cch); 68 69 69 70 virtual LONG SetWindowLongA(int index, ULONG value); … … 105 106 BOOL IsWindowVisible(); 106 107 108 BOOL GetWindowRect(PRECT pRect); 109 int GetWindowTextLengthA(); 110 int GetWindowTextA(LPSTR lpsz, int cch); 111 BOOL SetWindowTextA(LPCSTR lpsz); 112 107 113 LRESULT SendMessageA(ULONG msg, WPARAM wParam, LPARAM lParam); 108 114 LRESULT SendMessageW(ULONG msg, WPARAM wParam, LPARAM lParam); … … 119 125 120 126 protected: 127 LRESULT SendInternalMessageA(ULONG msg, WPARAM wParam, LPARAM lParam); 128 LRESULT SendInternalMessageW(ULONG msg, WPARAM wParam, LPARAM lParam); 121 129 void Init(); 122 130 … … 173 181 RECT *newClientRect ); 174 182 175 LRESULT sendMessage(ULONG msg, WPARAM wParam, LPARAM lParam)183 LRESULT SendInternalMessage(ULONG msg, WPARAM wParam, LPARAM lParam) 176 184 { 177 185 if(isUnicode) 178 return Send MessageW(msg, wParam, lParam);179 else return Send MessageA(msg, wParam, lParam);186 return SendInternalMessageW(msg, wParam, lParam); 187 else return SendInternalMessageA(msg, wParam, lParam); 180 188 } 181 189 #endif -
trunk/src/user32/new/window.cpp
r321 r325 1 /* $Id: window.cpp,v 1. 4 1999-07-17 11:52:23sandervl Exp $ */1 /* $Id: window.cpp,v 1.5 1999-07-18 10:39:52 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 475 475 //****************************************************************************** 476 476 //****************************************************************************** 477 BOOL WIN32API GetWindowRect( HWND arg1, PRECT arg2) 478 { 479 BOOL rc; 480 481 rc = O32_GetWindowRect(arg1, arg2); 482 dprintf(("USER32: GetWindowRect %X returned %d\n", arg1, rc)); 483 return(rc); 484 } 485 //****************************************************************************** 486 //****************************************************************************** 487 BOOL WIN32API SetWindowTextA(HWND arg1, LPCSTR arg2) 488 { 489 #ifdef DEBUG 490 WriteLog("USER32: SetWindowText %s\n", arg2); 491 #endif 492 return O32_SetWindowText(arg1, arg2); 477 BOOL WIN32API GetWindowRect( HWND hwnd, PRECT pRect) 478 { 479 Win32Window *window; 480 481 window = Win32Window::GetWindowFromHandle(hwnd); 482 if(!window) { 483 dprintf(("GetWindowRect, window %x not found", hwnd)); 484 return 0; 485 } 486 dprintf(("GetWindowRect %x", hwnd)); 487 return window->GetWindowRect(pRect); 488 } 489 //****************************************************************************** 490 //****************************************************************************** 491 int WIN32API GetWindowTextLengthA( HWND hwnd) 492 { 493 Win32Window *window; 494 495 window = Win32Window::GetWindowFromHandle(hwnd); 496 if(!window) { 497 dprintf(("GetWindowTextLength, window %x not found", hwnd)); 498 return 0; 499 } 500 dprintf(("GetWindowTextLength %x", hwnd)); 501 return window->GetWindowTextLengthA(); 502 } 503 //****************************************************************************** 504 //****************************************************************************** 505 int WIN32API GetWindowTextA( HWND hwnd, LPSTR lpsz, int cch) 506 { 507 Win32Window *window; 508 509 window = Win32Window::GetWindowFromHandle(hwnd); 510 if(!window) { 511 dprintf(("GetWindowTextA, window %x not found", hwnd)); 512 return 0; 513 } 514 dprintf(("GetWindowTextA %x", hwnd)); 515 return window->GetWindowTextA(lpsz, cch); 516 } 517 //****************************************************************************** 518 //****************************************************************************** 519 BOOL WIN32API SetWindowTextA(HWND hwnd, LPCSTR lpsz) 520 { 521 Win32Window *window; 522 523 window = Win32Window::GetWindowFromHandle(hwnd); 524 if(!window) { 525 dprintf(("SetWindowTextA, window %x not found", hwnd)); 526 return 0; 527 } 528 dprintf(("SetWindowTextA %x %s", hwnd, lpsz)); 529 return window->SetWindowTextA(lpsz); 493 530 } 494 531 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.