Changeset 10316 for trunk/src/user32/window.cpp
- Timestamp:
- Nov 12, 2003, 3:13:26 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/window.cpp
r10145 r10316 1 /* $Id: window.cpp,v 1.13 6 2003-06-25 17:02:04sandervl Exp $ */1 /* $Id: window.cpp,v 1.137 2003-11-12 14:10:21 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 44 44 #include <winuser32.h> 45 45 #include "hook.h" 46 #include <wprocess.h> 46 47 47 48 #define DBG_LOCALLOG DBG_window … … 711 712 { 712 713 HWND hwndAncestor = 0; 714 Win32BaseWindow *window; 715 716 window = Win32BaseWindow::GetWindowFromHandle(hwnd); 717 if(!window) { 718 dprintf(("GetAncestor, window %x not found", hwnd)); 719 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 720 return FALSE; 721 } 713 722 714 723 if (type == GA_PARENT) … … 719 728 } 720 729 //else no child -> no parent (GetParent returns owner otherwise!) 721 return hwndAncestor; 722 } 723 dprintf(("Unsupported type %d", type)); 724 return 0; 730 } 731 else 732 if (type == GA_ROOT) 733 { 734 hwndAncestor = window->GetTopParent(); 735 } 736 else 737 if (type == GA_ROOTOWNER) 738 { 739 if(hwnd != GetDesktopWindow()) 740 { 741 hwndAncestor = hwnd; 742 for(;;) 743 { 744 HWND parent = GetParent( hwndAncestor ); 745 if (!parent) break; 746 hwndAncestor = parent; 747 } 748 } 749 } 750 else dprintf(("Unsupported type %d", type)); 751 752 RELEASE_WNDOBJ(window); 753 return hwndAncestor; 725 754 } 726 755 //****************************************************************************** … … 760 789 return 0; 761 790 } 791 fIgnoreKeystrokes = TRUE; 762 792 SendMessageA(lastFocus_W, WM_KILLFOCUS, 0, 0); 763 764 fIgnoreKeystrokes = TRUE;765 793 766 794 return lastFocus_W; … … 2151 2179 } 2152 2180 //****************************************************************************** 2181 //The GetWindowModuleFileName function retrieves the full path and file name of 2182 //the module associated with the specified window handle. 2183 //****************************************************************************** 2184 UINT WIN32API GetWindowModuleFileNameA(HWND hwnd, LPTSTR lpszFileName, UINT cchFileNameMax) 2185 { 2186 WNDPROC lpfnWindowProc; 2187 2188 if (!IsWindow(hwnd)) { 2189 dprintf(("warning: GetWindowModuleFileName: window %x not found!", hwnd)); 2190 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 2191 return 0; 2192 } 2193 lpfnWindowProc = (WNDPROC)GetWindowLongA(hwnd, GWL_WNDPROC); 2194 return GetProcModuleFileNameA((ULONG)lpfnWindowProc, lpszFileName, cchFileNameMax); 2195 } 2196 //****************************************************************************** 2153 2197 //****************************************************************************** 2154 2198
Note:
See TracChangeset
for help on using the changeset viewer.