Changeset 1240 for trunk/src/user32
- Timestamp:
- Oct 10, 1999, 10:59:41 AM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/msgbox.cpp
r1096 r1240 1 /* $Id: msgbox.cpp,v 1. 3 1999-10-01 10:15:23sandervl Exp $ */1 /* $Id: msgbox.cpp,v 1.4 1999-10-10 08:59:40 sandervl Exp $ */ 2 2 /* 3 3 * Win32 message box function for OS/2 … … 149 149 //****************************************************************************** 150 150 //****************************************************************************** 151 int WIN32API MessageBoxW(HWND arg1, LPCWSTR arg2, LPCWSTR arg3, UINT arg4)151 int WIN32API MessageBoxW(HWND hwndOwner, LPCWSTR arg2, LPCWSTR arg3, UINT arg4) 152 152 { 153 153 char *astring1, *astring2; … … 159 159 WriteLog("USER32: MessageBoxW %s %s\n", astring1, astring2); 160 160 #endif 161 rc = O32_MessageBox(arg1, astring1, astring2, arg4); 161 hwndOwner = Win32Window::Win32ToOS2Handle(hwndOwner); 162 rc = O32_MessageBox(hwndOwner, astring1, astring2, arg4); 162 163 FreeAsciiString(astring1); 163 164 FreeAsciiString(astring2); -
trunk/src/user32/oslibwin.cpp
r1202 r1240 1 /* $Id: oslibwin.cpp,v 1.1 8 1999-10-08 21:25:26 cbratschiExp $ */1 /* $Id: oslibwin.cpp,v 1.19 1999-10-10 08:59:40 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 120 120 if (dwStyle & WS_CHILD_W) 121 121 { 122 //SvL: Causes crash in VPBuddy if enabled 123 #if 0 122 124 if (dwStyle & WS_BORDER_W || 123 125 dwStyle & WS_DLGFRAME_W || 124 126 dwStyle & WS_THICKFRAME_W) 125 if (!HAS_3DFRAME(*OSFrameStyle)) *OSFrameStyle |= WS_EX_WINDOWEDGE_W; 127 if (!HAS_3DFRAME(dwExStyle)) dwExStyle |= WS_EX_WINDOWEDGE_W; 128 #endif 126 129 127 130 if (dwExStyle & WS_EX_CLIENTEDGE_W || … … 132 135 *borderHeight = *borderWidth = 2; //CB: right? 133 136 } 134 135 137 if(dwStyle & WS_VSCROLL_W) 136 138 *OSFrameStyle |= FCF_VERTSCROLL; 137 139 if(dwStyle & WS_HSCROLL_W) 138 140 *OSFrameStyle |= FCF_HORZSCROLL; 139 } else 141 } 142 else 140 143 { 141 144 if((dwStyle & WS_CAPTION_W) == WS_CAPTION_W) -
trunk/src/user32/win32dlg.cpp
r1194 r1240 1 /* $Id: win32dlg.cpp,v 1. 8 1999-10-08 18:39:34sandervl Exp $ */1 /* $Id: win32dlg.cpp,v 1.9 1999-10-10 08:59:41 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Dialog Code for OS/2 … … 199 199 hwndFocus = GetNextDlgTabItem( getWindowHandle(), 0, FALSE ); 200 200 201 201 if (SendMessageA(WM_INITDIALOG, (WPARAM)hwndFocus, param )) 202 202 SetFocus(hwndFocus); 203 203 … … 207 207 ::UpdateWindow( getWindowHandle() ); 208 208 } 209 209 SetLastError(0); 210 210 dprintf(("********* DIALOG CREATED ************")); 211 211 return; … … 233 233 /* Owner must be a top-level window */ 234 234 if(getOwner() == NULL) { 235 235 topOwner = windowDesktop; 236 236 } 237 237 else topOwner = getOwner()->getTopParent(); … … 980 980 if (child == nextchild) break; 981 981 982 982 if ((nextchild->getStyle() & WS_TABSTOP) && (nextchild->getStyle() & WS_VISIBLE) && 983 983 !(nextchild->getStyle() & WS_DISABLED)) 984 { 985 lastchild = nextchild; 986 if (!fPrevious) break; 987 } 988 nextchild = (Win32BaseWindow *)nextchild->getNextChild(); 989 } 990 retvalue = lastchild->getWindowHandle(); 991 992 END: 993 return retvalue; 994 } 995 //****************************************************************************** 996 //****************************************************************************** 997 HWND Win32Dialog::getNextDlgGroupItem(HWND hwndCtrl, BOOL fPrevious) 998 { 999 Win32BaseWindow *child, *nextchild, *lastchild; 1000 HWND retvalue; 1001 1002 if (hwndCtrl) 1003 { 1004 child = GetWindowFromHandle(hwndCtrl); 1005 if (!child) 1006 { 1007 retvalue = 0; 1008 goto END; 1009 } 1010 /* Make sure hwndCtrl is a top-level child */ 1011 while ((child->getStyle() & WS_CHILD) && (child->getParent() != this)) 1012 { 1013 child = child->getParent(); 1014 if(child == NULL) break; 1015 } 1016 1017 if (!child || child->getParent() != this) 1018 { 1019 retvalue = 0; 1020 goto END; 1021 } 1022 } 1023 else 1024 { 1025 /* No ctrl specified -> start from the beginning */ 1026 child = (Win32BaseWindow *)getFirstChild(); 1027 if (!child) 1028 { 1029 retvalue = 0; 1030 goto END; 1031 } 1032 1033 if (fPrevious) 1034 { 1035 while (child->getNextChild()) 1036 { 1037 child = (Win32BaseWindow *)child->getNextChild(); 1038 } 1039 } 1040 } 1041 1042 lastchild = child; 1043 nextchild = (Win32BaseWindow *)child->getNextChild(); 1044 while (TRUE) 1045 { 1046 if (!nextchild || nextchild->getStyle() & WS_GROUP) 1047 { 1048 /* Wrap-around to the beginning of the group */ 1049 Win32BaseWindow *pWndTemp; 1050 1051 nextchild = (Win32BaseWindow *)getFirstChild(); 1052 1053 for(pWndTemp = nextchild;pWndTemp;pWndTemp = (Win32BaseWindow *)pWndTemp->getNextChild()) 1054 { 1055 if (pWndTemp->getStyle() & WS_GROUP) nextchild = pWndTemp; 1056 if (pWndTemp == child) break; 1057 } 1058 1059 } 1060 if (nextchild == child) break; 1061 1062 if ((nextchild->getStyle() & WS_VISIBLE) && !(nextchild->getStyle() & WS_DISABLED)) 984 1063 { 985 1064 lastchild = nextchild; 986 if (!fPrevious) break; 987 } 988 nextchild = (Win32BaseWindow *)nextchild->getNextChild(); 1065 if (!fPrevious) break; 1066 } 989 1067 } 990 1068 retvalue = lastchild->getWindowHandle(); 991 992 1069 END: 993 1070 return retvalue; -
trunk/src/user32/win32dlg.h
r949 r1240 1 /* $Id: win32dlg.h,v 1. 1 1999-09-15 23:19:00sandervl Exp $ */1 /* $Id: win32dlg.h,v 1.2 1999-10-10 08:59:41 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Dialog Code for OS/2 … … 70 70 71 71 HWND getNextDlgTabItem(HWND hwndCtrl, BOOL fPrevious); 72 HWND getNextDlgGroupItem(HWND hwndCtrl, BOOL fPrevious); 72 73 BOOL endDialog(int retval); 73 74 -
trunk/src/user32/windlg.cpp
r1118 r1240 1 /* $Id: windlg.cpp,v 1. 3 1999-10-04 09:56:03sandervl Exp $ */1 /* $Id: windlg.cpp,v 1.4 1999-10-10 08:59:41 sandervl Exp $ */ 2 2 /* 3 3 * Win32 dialog apis for OS/2 … … 19 19 #include <string.h> 20 20 #include <stdlib.h> 21 #include <limits.h> 22 #include <errno.h> 21 23 #include "win32wbase.h" 22 24 #include "win32dlg.h" … … 316 318 //****************************************************************************** 317 319 //****************************************************************************** 318 UINT WIN32API GetDlgItemInt( HWND arg1, int arg2, PBOOL arg3, BOOL arg4) 319 { 320 #ifdef DEBUG 321 WriteLog("USER32: GetDlgItemInt\n"); 322 #endif 323 return O32_GetDlgItemInt(arg1, arg2, arg3, arg4); 324 } 325 //****************************************************************************** 326 //****************************************************************************** 327 HWND WIN32API GetNextDlgGroupItem( HWND arg1, HWND arg2, BOOL arg3) 328 { 329 #ifdef DEBUG 330 WriteLog("USER32: GetNextDlgGroupItem\n"); 331 #endif 332 return O32_GetNextDlgGroupItem(arg1, arg2, arg3); 320 UINT WIN32API GetDlgItemInt(HWND hwnd, INT id, BOOL *translated, BOOL fSigned) 321 { 322 char str[30]; 323 char * endptr; 324 long result = 0; 325 326 dprintf(("USER32: GetDlgItemInt\n")); 327 if (translated) *translated = FALSE; 328 329 if (!SendDlgItemMessageA(hwnd, id, WM_GETTEXT, sizeof(str), (LPARAM)str)) 330 return 0; 331 332 if (fSigned) 333 { 334 result = strtol( str, &endptr, 10 ); 335 if (!endptr || (endptr == str)) /* Conversion was unsuccessful */ 336 return 0; 337 if (((result == LONG_MIN) || (result == LONG_MAX)) && (errno==ERANGE)) 338 return 0; 339 } 340 else 341 { 342 result = strtoul( str, &endptr, 10 ); 343 if (!endptr || (endptr == str)) /* Conversion was unsuccessful */ 344 return 0; 345 if ((result == ULONG_MAX) && (errno == ERANGE)) return 0; 346 } 347 if (translated) *translated = TRUE; 348 return (UINT)result; 349 } 350 //****************************************************************************** 351 //****************************************************************************** 352 HWND WIN32API GetNextDlgGroupItem( HWND hwnd, HWND hwndCtrl, BOOL fPrevious) 353 { 354 Win32Dialog *dialog; 355 356 dialog = (Win32Dialog *)Win32BaseWindow::GetWindowFromHandle(hwnd); 357 if(!dialog || !dialog->IsDialog()) { 358 dprintf(("GetNextDlgGroupItem, window %x not found", hwnd)); 359 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 360 return 0; 361 } 362 dprintf(("USER32: GetNextDlgGroupItem\n")); 363 return dialog->getNextDlgGroupItem(hwndCtrl, fPrevious); 333 364 } 334 365 /***********************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.