- Timestamp:
- Oct 17, 1999, 10:18:47 PM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/win32dlg.cpp
r1336 r1346 1 /* $Id: win32dlg.cpp,v 1.1 7 1999-10-17 15:46:09sandervl Exp $ */1 /* $Id: win32dlg.cpp,v 1.18 1999-10-17 20:18:45 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Dialog Code for OS/2 … … 1156 1156 //****************************************************************************** 1157 1157 //****************************************************************************** 1158 Win32BaseWindow *Win32Dialog::getDlgItem(int id)1159 {1160 for (Win32BaseWindow *child = (Win32BaseWindow *)getFirstChild(); child; child = (Win32BaseWindow *)child->getNextChild())1161 {1162 if (child->getWindowId() == id)1163 {1164 return child;1165 }1166 }1167 return 0;1168 }1169 //******************************************************************************1170 //******************************************************************************1171 1158 BOOL Win32Dialog::endDialog(int retval) 1172 1159 { -
trunk/src/user32/win32dlg.h
r1281 r1346 1 /* $Id: win32dlg.h,v 1. 3 1999-10-14 09:22:41sandervl Exp $ */1 /* $Id: win32dlg.h,v 1.4 1999-10-17 20:18:45 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Dialog Code for OS/2 … … 67 67 LRESULT DefDlgProcW(UINT Msg, WPARAM wParam, LPARAM lParam); 68 68 69 Win32BaseWindow *getDlgItem(int id) ;69 Win32BaseWindow *getDlgItem(int id) { return FindWindowById(id); }; 70 70 71 71 HWND getNextDlgTabItem(HWND hwndCtrl, BOOL fPrevious); -
trunk/src/user32/win32wbase.cpp
r1340 r1346 1 /* $Id: win32wbase.cpp,v 1.5 1 1999-10-17 16:59:58sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.52 1999-10-17 20:18:45 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 2175 2175 } 2176 2176 //****************************************************************************** 2177 //****************************************************************************** 2178 Win32BaseWindow *Win32BaseWindow::FindWindowById(int id) 2179 { 2180 for (Win32BaseWindow *child = (Win32BaseWindow *)getFirstChild(); child; child = (Win32BaseWindow *)child->getNextChild()) 2181 { 2182 if (child->getWindowId() == id) 2183 { 2184 return child; 2185 } 2186 } 2187 return 0; 2188 } 2189 //****************************************************************************** 2177 2190 //TODO: 2178 2191 //We assume (for now) that if hwndParent or hwndChildAfter are real window handles, that … … 2379 2392 BOOL Win32BaseWindow::IsWindowVisible() 2380 2393 { 2394 #if 1 2395 return (dwStyle & WS_VISIBLE) == WS_VISIBLE; 2396 #else 2381 2397 return OSLibWinIsWindowVisible(OS2Hwnd); 2398 #endif 2382 2399 } 2383 2400 //****************************************************************************** -
trunk/src/user32/win32wbase.h
r1337 r1346 1 /* $Id: win32wbase.h,v 1.2 8 1999-10-17 16:42:40sandervl Exp $ */1 /* $Id: win32wbase.h,v 1.29 1999-10-17 20:18:46 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 198 198 void NotifyParent(UINT Msg, WPARAM wParam, LPARAM lParam); 199 199 200 Win32BaseWindow *FindWindowById(int id); 201 200 202 static HWND FindWindowEx(HWND hwndParent, HWND hwndChildAfter, LPSTR lpszClass, LPSTR lpszWindow, 201 203 BOOL fUnicode = 0); -
trunk/src/user32/windlg.cpp
r1263 r1346 1 /* $Id: windlg.cpp,v 1. 6 1999-10-12 20:16:24sandervl Exp $ */1 /* $Id: windlg.cpp,v 1.7 1999-10-17 20:18:46 sandervl Exp $ */ 2 2 /* 3 3 * Win32 dialog apis for OS/2 … … 221 221 } 222 222 //****************************************************************************** 223 // TODO:Can be used for any parent-child pair223 //Can be used for any parent-child pair 224 224 //****************************************************************************** 225 225 HWND WIN32API GetDlgItem(HWND hwnd, int id) 226 226 { 227 Win32Dialog *dialog; 228 Win32BaseWindow *dlgcontrol; 229 230 dialog = (Win32Dialog *)Win32BaseWindow::GetWindowFromHandle(hwnd); 231 if(!dialog || !dialog->IsDialog()) { 227 Win32BaseWindow *dlgcontrol, *window; 228 229 window = (Win32Dialog *)Win32BaseWindow::GetWindowFromHandle(hwnd); 230 if(!window) { 232 231 dprintf(("GetDlgItem, window %x not found", hwnd)); 233 232 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 234 233 return 0; 235 234 } 236 dlgcontrol = dialog->getDlgItem(id);235 dlgcontrol = window->FindWindowById(id); 237 236 if(dlgcontrol) { 238 237 dprintf(("USER32: GetDlgItem %x %d returned %x\n", hwnd, id, dlgcontrol->getWindowHandle())); -
trunk/src/user32/window.cpp
r1340 r1346 1 /* $Id: window.cpp,v 1. 19 1999-10-17 16:59:58sandervl Exp $ */1 /* $Id: window.cpp,v 1.20 1999-10-17 20:18:46 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 285 285 if(!window) { 286 286 dprintf(("DestroyWindow, window %x not found", hwnd)); 287 SetLastError(ERROR_INVALID_WINDOW_HANDLE);287 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 288 288 return 0; 289 289 } … … 300 300 if(!window) { 301 301 dprintf(("SetActiveWindow, window %x not found", hwnd)); 302 SetLastError(ERROR_INVALID_WINDOW_HANDLE);302 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 303 303 return 0; 304 304 } … … 315 315 if(!window) { 316 316 dprintf(("GetParent, window %x not found", hwnd)); 317 SetLastError(ERROR_INVALID_WINDOW_HANDLE);317 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 318 318 return 0; 319 319 } … … 330 330 if(!window) { 331 331 dprintf(("SetParent, window %x not found", hwndChild)); 332 SetLastError(ERROR_INVALID_WINDOW_HANDLE);332 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 333 333 return 0; 334 334 } … … 345 345 if(!window) { 346 346 dprintf(("IsChild, window %x not found", hwnd)); 347 SetLastError(ERROR_INVALID_WINDOW_HANDLE);347 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 348 348 return 0; 349 349 } … … 360 360 if(!window) { 361 361 dprintf(("GetTopWindow, window %x not found", hwnd)); 362 SetLastError(ERROR_INVALID_WINDOW_HANDLE);362 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 363 363 return 0; 364 364 } … … 374 374 if(!window) { 375 375 dprintf(("IsIconic, window %x not found", hwnd)); 376 SetLastError(ERROR_INVALID_WINDOW_HANDLE);376 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 377 377 return 0; 378 378 } … … 390 390 if(!window) { 391 391 dprintf(("GetWindow, window %x not found", hwnd)); 392 SetLastError(ERROR_INVALID_WINDOW_HANDLE);392 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 393 393 return 0; 394 394 } … … 405 405 if(!window) { 406 406 dprintf(("EnableWindow, window %x not found", hwnd)); 407 SetLastError(ERROR_INVALID_WINDOW_HANDLE);407 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 408 408 return 0; 409 409 } … … 421 421 HWND WIN32API GetActiveWindow() 422 422 { 423 return Win32BaseWindow::GetActiveWindow();423 return Win32BaseWindow::GetActiveWindow(); 424 424 } 425 425 //****************************************************************************** … … 507 507 { 508 508 Win32BaseWindow *window; 509 BOOL rc; 509 510 510 511 window = Win32BaseWindow::GetWindowFromHandle(hwnd); 511 512 if(!window) { 512 513 dprintf(("IsWindowVisible, window %x not found", hwnd)); 513 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 514 return 0; 515 } 516 dprintf(("IsWindowVisible %x", hwnd)); 517 return window->IsWindowVisible(); 514 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 515 return 0; 516 } 517 rc = window->IsWindowVisible(); 518 dprintf(("IsWindowVisible %x returned %d", hwnd, rc)); 519 return rc; 518 520 } 519 521 //****************************************************************************** … … 1024 1026 int i; 1025 1027 1026 dprintf(("EndDeferWindowPos\n"));1027 1028 pDWP = (DWP *) hdwp; 1028 1029 if (!pDWP) { 1030 dprintf(("**EndDeferWindowPos invalid parameter\n")); 1029 1031 SetLastError(ERROR_INVALID_PARAMETER); 1030 1032 return FALSE; 1031 1033 } 1034 dprintf(("**EndDeferWindowPos for %d windows", pDWP->actualCount)); 1032 1035 for (i = 0, winpos = pDWP->winPos; i < pDWP->actualCount; i++, winpos++) 1033 1036 { 1037 dprintf(("**EndDeferWindowPos %x (%d,%d) (%d,%d) %x", winpos->hwnd, winpos->x, winpos->y, winpos->x, winpos->cy, winpos->flags)); 1034 1038 if (!(res = SetWindowPos(winpos->hwnd, winpos->hwndInsertAfter, 1035 1039 winpos->x, winpos->y, winpos->cx, … … 1037 1041 break; 1038 1042 } 1043 dprintf(("**EndDeferWindowPos DONE")); 1039 1044 HeapFree(GetProcessHeap(), 0, (LPVOID)hdwp); 1040 1045 return res; -
trunk/src/user32/wndmsg.cpp
r1245 r1346 1 /* $Id: wndmsg.cpp,v 1. 4 1999-10-11 15:26:07 sandervl Exp $ */1 /* $Id: wndmsg.cpp,v 1.5 1999-10-17 20:18:47 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window message text function for OS/2 … … 13 13 #include <stdio.h> 14 14 #include <string.h> 15 #include <win\winmfcmsg.h> 15 16 16 17 #ifdef DEBUG … … 606 607 { "WM_HOTKEY", WM_HOTKEY, // 0x0312 607 608 MTF_TYPE_KEYBD}, 609 { "WM_QUERYAFXWNDPROC", WM_QUERYAFXWNDPROC, // 0x0360 610 0}, 611 { "WM_SIZEPARENT", WM_SIZEPARENT, // 0x0361 612 0}, 613 { "WM_SETMESSAGESTRING", WM_SETMESSAGESTRING, // 0x0362 614 0}, 615 { "WM_IDLEUPDATECMDUI", WM_IDLEUPDATECMDUI, // 0x0363 616 0}, 617 { "WM_INITIALUPDATE", WM_INITIALUPDATE, // 0x0364 618 0}, 619 { "WM_COMMANDHELP", WM_COMMANDHELP, // 0x0365 620 0}, 621 { "WM_HELPHITTEST", WM_HELPHITTEST, // 0x0366 622 0}, 623 { "WM_EXITHELPMODE", WM_EXITHELPMODE, // 0x0367 624 0}, 625 { "WM_RECALCPARENT", WM_RECALCPARENT, // 0x0368 626 0}, 627 { "WM_SIZECHILD", WM_SIZECHILD, // 0x0369 628 0}, 629 { "WM_KICKIDLE", WM_KICKIDLE, // 0x036A 630 0}, 631 { "WM_QUERYCENTERWND", WM_QUERYCENTERWND, // 0x036B 632 0}, 633 { "WM_DISABLEMODAL", WM_DISABLEMODAL, // 0x036C 634 0}, 635 { "WM_FLOATSTATUS", WM_FLOATSTATUS, // 0x036D 636 0}, 637 { "WM_ACTIVATETOPLEVEL", WM_ACTIVATETOPLEVEL, // 0x036E 638 0}, 639 { "WM_QUERY3DCONTROLS", WM_QUERY3DCONTROLS, // 0x036F 640 0}, 641 { "WM_SOCKET_NOTIFY", WM_SOCKET_NOTIFY, // 0x0373 642 0}, 643 { "WM_SOCKET_DEAD", WM_SOCKET_DEAD, // 0x0374 644 0}, 645 { "WM_POPMESSAGESTRING", WM_POPMESSAGESTRING, // 0x0375 646 0}, 647 { "WM_OCC_LOADFROMSTREAM", WM_OCC_LOADFROMSTREAM, // 0x0376 648 0}, 649 { "WM_OCC_LOADFROMSTORAGE", WM_OCC_LOADFROMSTORAGE, // 0x0377 650 0}, 651 { "WM_OCC_INITNEW", WM_OCC_INITNEW, // 0x0378 652 0}, 653 { "WM_QUEUE_SENTINEL", WM_QUEUE_SENTINEL, // 0x0379 654 0}, 655 { "WM_OCC_LOADFROMSTREAM_EX", WM_OCC_LOADFROMSTREAM_EX, // 0x037A 656 0}, 657 { "WM_OCC_LOADFROMSTORAGE_EX", WM_OCC_LOADFROMSTORAGE_EX, // 0x037B 658 0}, 608 659 { "WM_DDE_INITIATE", WM_DDE_INITIATE, // 0x03E0 609 660 MTF_TYPE_DDE},
Note:
See TracChangeset
for help on using the changeset viewer.