2005-01-06 13:58:04 +00:00
|
|
|
/* $Id$
|
2001-06-12 17:51:51 +00:00
|
|
|
*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS user32.dll
|
|
|
|
* FILE: lib/user32/windows/window.c
|
|
|
|
* PURPOSE: Window management
|
|
|
|
* PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
|
|
|
|
* UPDATE HISTORY:
|
|
|
|
* 06-06-2001 CSH Created
|
|
|
|
*/
|
2002-01-13 22:52:08 +00:00
|
|
|
|
|
|
|
/* INCLUDES ******************************************************************/
|
2006-07-04 05:56:25 +00:00
|
|
|
#define DEBUG
|
2005-06-19 18:06:53 +00:00
|
|
|
#include <user32.h>
|
2006-06-26 13:16:43 +00:00
|
|
|
|
|
|
|
#include <wine/debug.h>
|
2003-05-04 15:41:40 +00:00
|
|
|
|
2004-12-24 17:45:59 +00:00
|
|
|
BOOL ControlsInitialized = FALSE;
|
|
|
|
|
2005-03-21 01:59:21 +00:00
|
|
|
LRESULT DefWndNCPaint(HWND hWnd, HRGN hRgn, BOOL Active);
|
2006-07-04 05:56:25 +00:00
|
|
|
void MDI_CalcDefaultChildPos( HWND hwndClient, INT total, LPPOINT lpPos, INT delta, UINT *id );
|
|
|
|
|
|
|
|
#define CW_USEDEFAULT16 0x00008000
|
2004-04-15 23:36:03 +00:00
|
|
|
|
2002-01-13 22:52:08 +00:00
|
|
|
/* FUNCTIONS *****************************************************************/
|
2001-06-12 17:51:51 +00:00
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
2002-05-06 22:20:32 +00:00
|
|
|
NTSTATUS STDCALL
|
|
|
|
User32CallSendAsyncProcForKernel(PVOID Arguments, ULONG ArgumentLength)
|
|
|
|
{
|
|
|
|
PSENDASYNCPROC_CALLBACK_ARGUMENTS CallbackArgs;
|
2002-06-18 21:51:11 +00:00
|
|
|
|
2003-05-04 15:41:40 +00:00
|
|
|
DPRINT("User32CallSendAsyncProcKernel()\n");
|
2002-05-06 22:20:32 +00:00
|
|
|
CallbackArgs = (PSENDASYNCPROC_CALLBACK_ARGUMENTS)Arguments;
|
|
|
|
if (ArgumentLength != sizeof(WINDOWPROC_CALLBACK_ARGUMENTS))
|
|
|
|
{
|
|
|
|
return(STATUS_INFO_LENGTH_MISMATCH);
|
|
|
|
}
|
2002-07-04 19:56:38 +00:00
|
|
|
CallbackArgs->Callback(CallbackArgs->Wnd, CallbackArgs->Msg,
|
|
|
|
CallbackArgs->Context, CallbackArgs->Result);
|
2002-05-06 22:20:32 +00:00
|
|
|
return(STATUS_SUCCESS);
|
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
2003-08-20 03:07:33 +00:00
|
|
|
* @unimplemented
|
2003-07-10 21:04:32 +00:00
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2003-08-20 03:07:33 +00:00
|
|
|
AllowSetForegroundWindow(DWORD dwProcessId)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-08-20 03:07:33 +00:00
|
|
|
UNIMPLEMENTED;
|
|
|
|
return(FALSE);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2002-01-13 22:52:08 +00:00
|
|
|
HDWP STDCALL
|
|
|
|
BeginDeferWindowPos(int nNumWindows)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-10-19 19:51:48 +00:00
|
|
|
#if 0
|
2003-05-12 19:30:00 +00:00
|
|
|
UNIMPLEMENTED;
|
2001-06-12 17:51:51 +00:00
|
|
|
return (HDWP)0;
|
2003-10-19 19:51:48 +00:00
|
|
|
#else
|
|
|
|
return (HDWP)1;
|
|
|
|
#endif
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
2004-12-16 03:57:35 +00:00
|
|
|
* @implemented
|
2003-07-10 21:04:32 +00:00
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
BringWindowToTop(HWND hWnd)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2005-05-09 01:42:07 +00:00
|
|
|
return NtUserSetWindowPos( hWnd,
|
|
|
|
HWND_TOP,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
2004-12-16 03:57:35 +00:00
|
|
|
0,
|
|
|
|
SWP_NOSIZE | SWP_NOMOVE );
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2003-11-02 06:58:57 +00:00
|
|
|
/*
|
2002-01-13 22:52:08 +00:00
|
|
|
WORD STDCALL
|
|
|
|
CascadeWindows(HWND hwndParent,
|
|
|
|
UINT wHow,
|
|
|
|
CONST RECT *lpRect,
|
|
|
|
UINT cKids,
|
|
|
|
const HWND *lpKids)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-05-12 19:30:00 +00:00
|
|
|
UNIMPLEMENTED;
|
2001-06-12 17:51:51 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2003-11-02 06:58:57 +00:00
|
|
|
*/
|
2001-06-12 17:51:51 +00:00
|
|
|
|
2004-12-16 03:57:35 +00:00
|
|
|
VOID
|
|
|
|
STDCALL
|
|
|
|
SwitchToThisWindow ( HWND hwnd, BOOL fUnknown )
|
|
|
|
{
|
|
|
|
ShowWindow ( hwnd, SW_SHOW );
|
|
|
|
}
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
2004-02-02 00:18:58 +00:00
|
|
|
* @implemented
|
2003-07-10 21:04:32 +00:00
|
|
|
*/
|
2002-01-13 22:52:08 +00:00
|
|
|
HWND STDCALL
|
|
|
|
ChildWindowFromPoint(HWND hWndParent,
|
|
|
|
POINT Point)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2004-02-02 11:46:41 +00:00
|
|
|
return (HWND) NtUserChildWindowFromPointEx(hWndParent, Point.x, Point.y, 0);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
2004-02-02 00:18:58 +00:00
|
|
|
* @implemented
|
2003-07-10 21:04:32 +00:00
|
|
|
*/
|
2002-01-13 22:52:08 +00:00
|
|
|
HWND STDCALL
|
|
|
|
ChildWindowFromPointEx(HWND hwndParent,
|
|
|
|
POINT pt,
|
|
|
|
UINT uFlags)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2004-02-02 11:46:41 +00:00
|
|
|
return (HWND) NtUserChildWindowFromPointEx(hwndParent, pt.x, pt.y, uFlags);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
CloseWindow(HWND hWnd)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-03-18 07:01:09 +00:00
|
|
|
SendMessageA(hWnd, WM_SYSCOMMAND, SC_CLOSE, 0);
|
2003-05-12 19:30:00 +00:00
|
|
|
|
2004-01-23 23:38:26 +00:00
|
|
|
return (BOOL)(hWnd);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2006-07-04 18:26:49 +00:00
|
|
|
|
2002-01-13 22:52:08 +00:00
|
|
|
HWND STDCALL
|
2006-07-04 18:26:49 +00:00
|
|
|
User32CreateWindowEx(DWORD dwExStyle,
|
2002-01-13 22:52:08 +00:00
|
|
|
LPCSTR lpClassName,
|
|
|
|
LPCSTR lpWindowName,
|
|
|
|
DWORD dwStyle,
|
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int nWidth,
|
|
|
|
int nHeight,
|
|
|
|
HWND hWndParent,
|
|
|
|
HMENU hMenu,
|
|
|
|
HINSTANCE hInstance,
|
2006-07-04 18:26:49 +00:00
|
|
|
LPVOID lpParam,
|
|
|
|
BOOL Unicode)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
|
|
|
UNICODE_STRING WindowName;
|
|
|
|
UNICODE_STRING ClassName;
|
2006-07-04 18:26:49 +00:00
|
|
|
WNDCLASSEXA wceA;
|
|
|
|
WNDCLASSEXW wceW;
|
2001-06-12 17:51:51 +00:00
|
|
|
HWND Handle;
|
2006-07-04 05:56:25 +00:00
|
|
|
MDICREATESTRUCTA mdi;
|
2003-08-17 17:32:58 +00:00
|
|
|
|
2003-08-28 13:38:24 +00:00
|
|
|
#if 0
|
2006-07-04 18:26:49 +00:00
|
|
|
DbgPrint("[window] User32CreateWindowEx style %d, exstyle %d, parent %d\n", dwStyle, dwExStyle, hWndParent);
|
2003-08-28 13:38:24 +00:00
|
|
|
#endif
|
2006-07-04 18:26:49 +00:00
|
|
|
|
2003-05-12 19:30:00 +00:00
|
|
|
if (IS_ATOM(lpClassName))
|
2002-01-13 22:52:08 +00:00
|
|
|
{
|
|
|
|
RtlInitUnicodeString(&ClassName, NULL);
|
|
|
|
ClassName.Buffer = (LPWSTR)lpClassName;
|
2003-05-12 19:30:00 +00:00
|
|
|
}
|
|
|
|
else
|
2002-01-13 22:52:08 +00:00
|
|
|
{
|
2006-07-04 18:26:49 +00:00
|
|
|
if(Unicode)
|
|
|
|
RtlInitUnicodeString(&ClassName, (PCWSTR)lpClassName);
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (!RtlCreateUnicodeStringFromAsciiz(&(ClassName), (PCSZ)lpClassName))
|
|
|
|
{
|
|
|
|
SetLastError(ERROR_OUTOFMEMORY);
|
|
|
|
return (HWND)0;
|
|
|
|
}
|
|
|
|
}
|
2002-01-13 22:52:08 +00:00
|
|
|
}
|
2001-06-12 17:51:51 +00:00
|
|
|
|
2004-12-24 17:45:59 +00:00
|
|
|
/* Register built-in controls if not already done */
|
|
|
|
if (! ControlsInitialized)
|
|
|
|
{
|
|
|
|
ControlsInitialized = ControlsInit(ClassName.Buffer);
|
|
|
|
}
|
|
|
|
|
2003-12-18 16:47:27 +00:00
|
|
|
if (dwExStyle & WS_EX_MDICHILD)
|
|
|
|
{
|
2006-07-04 05:56:25 +00:00
|
|
|
POINT mPos[2];
|
|
|
|
UINT id = 0;
|
|
|
|
/* lpParams of WM_[NC]CREATE is different for MDI children.
|
|
|
|
* MDICREATESTRUCT members have the originally passed values.
|
|
|
|
*
|
|
|
|
* Note: we rely on the fact that MDICREATESTRUCTA and MDICREATESTRUCTW
|
|
|
|
* have the same layout.
|
|
|
|
*/
|
2006-07-04 18:26:49 +00:00
|
|
|
mdi.szClass = (LPCSTR)lpClassName;
|
|
|
|
mdi.szTitle = (LPCSTR)lpWindowName;
|
2006-07-04 05:56:25 +00:00
|
|
|
mdi.hOwner = hInstance;
|
|
|
|
mdi.x = x;
|
|
|
|
mdi.y = y;
|
|
|
|
mdi.cx = nWidth;
|
|
|
|
mdi.cy = nHeight;
|
|
|
|
mdi.style = dwStyle;
|
|
|
|
mdi.lParam = (LPARAM)lpParam;
|
|
|
|
|
|
|
|
lpParam = (LPVOID)&mdi;
|
|
|
|
|
|
|
|
if (GetWindowLongW(hWndParent, GWL_STYLE) & MDIS_ALLCHILDSTYLES)
|
|
|
|
{
|
|
|
|
if (dwStyle & WS_POPUP)
|
|
|
|
{
|
|
|
|
DPRINT1("WS_POPUP with MDIS_ALLCHILDSTYLES is not allowed\n");
|
|
|
|
return(0);
|
|
|
|
}
|
|
|
|
dwStyle |= (WS_CHILD | WS_CLIPSIBLINGS);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
dwStyle &= ~WS_POPUP;
|
|
|
|
dwStyle |= (WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION |
|
|
|
|
WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX);
|
|
|
|
}
|
|
|
|
|
|
|
|
HWND top_child = GetWindow(hWndParent, GW_CHILD);
|
|
|
|
|
|
|
|
if (top_child)
|
|
|
|
{
|
|
|
|
/* Restore current maximized child */
|
|
|
|
if((dwStyle & WS_VISIBLE) && IsZoomed(top_child))
|
|
|
|
{
|
|
|
|
DPRINT("Restoring current maximized child %p\n", top_child);
|
|
|
|
SendMessageW( top_child, WM_SETREDRAW, FALSE, 0 );
|
|
|
|
ShowWindow(top_child, SW_RESTORE);
|
|
|
|
SendMessageW( top_child, WM_SETREDRAW, TRUE, 0 );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
MDI_CalcDefaultChildPos(hWndParent, -1, mPos, 0, &id);
|
|
|
|
|
|
|
|
if (!(dwStyle & WS_POPUP)) hMenu = (HMENU)id;
|
|
|
|
|
|
|
|
if (dwStyle & (WS_CHILD | WS_POPUP))
|
|
|
|
{
|
|
|
|
if (x == CW_USEDEFAULT || x == CW_USEDEFAULT16)
|
|
|
|
{
|
|
|
|
x = mPos[0].x;
|
|
|
|
y = mPos[0].y;
|
|
|
|
}
|
|
|
|
if (nWidth == CW_USEDEFAULT || nWidth == CW_USEDEFAULT16 || !nWidth)
|
|
|
|
nWidth = mPos[1].x;
|
|
|
|
if (nHeight == CW_USEDEFAULT || nHeight == CW_USEDEFAULT16 || !nHeight)
|
|
|
|
nHeight = mPos[1].y;
|
|
|
|
}
|
2003-12-18 16:47:27 +00:00
|
|
|
}
|
|
|
|
|
2006-07-04 18:26:49 +00:00
|
|
|
if (Unicode)
|
|
|
|
RtlInitUnicodeString(&WindowName, (PCWSTR)lpWindowName);
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (!RtlCreateUnicodeStringFromAsciiz(&WindowName, (PCSZ)lpWindowName))
|
|
|
|
{
|
|
|
|
if (!IS_ATOM(lpClassName))
|
|
|
|
{
|
|
|
|
RtlFreeUnicodeString(&ClassName);
|
|
|
|
}
|
|
|
|
SetLastError(ERROR_OUTOFMEMORY);
|
|
|
|
return (HWND)0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-09-13 13:58:38 +00:00
|
|
|
if(!hMenu && (dwStyle & (WS_OVERLAPPEDWINDOW | WS_POPUP)))
|
2003-08-18 23:52:03 +00:00
|
|
|
{
|
2006-07-04 18:26:49 +00:00
|
|
|
if(Unicode)
|
|
|
|
{
|
|
|
|
wceW.cbSize = sizeof(WNDCLASSEXW);
|
|
|
|
if(GetClassInfoExW(hInstance, (LPCWSTR)lpClassName, &wceW) && wceW.lpszMenuName)
|
|
|
|
{DbgPrint("LoadingMenu 0x%p %d\n", wceW.lpszMenuName, IS_INTRESOURCE(wceW.lpszMenuName));
|
|
|
|
hMenu = LoadMenuW(hInstance, wceW.lpszMenuName);DbgPrint("Loaded menu: 0x%p\n", hMenu);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
2003-08-18 23:52:03 +00:00
|
|
|
{
|
2006-07-04 18:26:49 +00:00
|
|
|
wceA.cbSize = sizeof(WNDCLASSEXA);
|
|
|
|
if(GetClassInfoExA(hInstance, lpClassName, &wceA) && wceA.lpszMenuName)
|
|
|
|
{
|
|
|
|
hMenu = LoadMenuA(hInstance, wceA.lpszMenuName);
|
|
|
|
}
|
2003-08-18 23:52:03 +00:00
|
|
|
}
|
|
|
|
}
|
2002-05-06 22:20:32 +00:00
|
|
|
|
2002-01-13 22:52:08 +00:00
|
|
|
Handle = NtUserCreateWindowEx(dwExStyle,
|
|
|
|
&ClassName,
|
|
|
|
&WindowName,
|
|
|
|
dwStyle,
|
|
|
|
x,
|
|
|
|
y,
|
|
|
|
nWidth,
|
|
|
|
nHeight,
|
|
|
|
hWndParent,
|
|
|
|
hMenu,
|
2006-07-03 04:33:29 +00:00
|
|
|
hInstance,
|
2002-01-13 22:52:08 +00:00
|
|
|
lpParam,
|
2004-05-08 12:42:46 +00:00
|
|
|
SW_SHOW,
|
2003-11-11 20:28:21 +00:00
|
|
|
FALSE);
|
2001-06-12 17:51:51 +00:00
|
|
|
|
2003-08-28 13:38:24 +00:00
|
|
|
#if 0
|
|
|
|
DbgPrint("[window] NtUserCreateWindowEx() == %d\n", Handle);
|
|
|
|
#endif
|
2003-08-15 02:51:53 +00:00
|
|
|
|
2007-06-08 11:58:04 +00:00
|
|
|
if ((dwStyle & WS_VISIBLE) && (dwExStyle & WS_EX_MDICHILD) && Handle != (HWND)0)
|
2006-07-04 05:56:25 +00:00
|
|
|
{
|
|
|
|
SendMessageW(hWndParent, WM_MDIREFRESHMENU, 0, 0);
|
|
|
|
SetWindowPos(Handle, HWND_TOP, 0, 0, 0, 0, SWP_SHOWWINDOW |
|
|
|
|
SWP_NOMOVE | SWP_NOSIZE);
|
|
|
|
}
|
|
|
|
|
2006-07-04 18:26:49 +00:00
|
|
|
if(!Unicode)
|
|
|
|
{
|
|
|
|
RtlFreeUnicodeString(&WindowName);
|
2006-07-04 05:56:25 +00:00
|
|
|
|
2006-07-04 18:26:49 +00:00
|
|
|
if (!IS_ATOM(lpClassName))
|
|
|
|
{
|
|
|
|
RtlFreeUnicodeString(&ClassName);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return Handle;
|
|
|
|
}
|
2001-06-12 17:51:51 +00:00
|
|
|
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2006-07-04 18:26:49 +00:00
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
|
|
|
HWND STDCALL
|
|
|
|
CreateWindowExA(DWORD dwExStyle,
|
|
|
|
LPCSTR lpClassName,
|
|
|
|
LPCSTR lpWindowName,
|
|
|
|
DWORD dwStyle,
|
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int nWidth,
|
|
|
|
int nHeight,
|
|
|
|
HWND hWndParent,
|
|
|
|
HMENU hMenu,
|
|
|
|
HINSTANCE hInstance,
|
|
|
|
LPVOID lpParam)
|
|
|
|
{
|
|
|
|
return User32CreateWindowEx(dwExStyle,
|
|
|
|
lpClassName,
|
|
|
|
lpWindowName,
|
|
|
|
dwStyle,
|
|
|
|
x,
|
|
|
|
y,
|
|
|
|
nWidth,
|
|
|
|
nHeight,
|
|
|
|
hWndParent,
|
|
|
|
hMenu,
|
|
|
|
hInstance,
|
|
|
|
lpParam,
|
|
|
|
FALSE);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2002-01-13 22:52:08 +00:00
|
|
|
HWND STDCALL
|
|
|
|
CreateWindowExW(DWORD dwExStyle,
|
|
|
|
LPCWSTR lpClassName,
|
|
|
|
LPCWSTR lpWindowName,
|
|
|
|
DWORD dwStyle,
|
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int nWidth,
|
|
|
|
int nHeight,
|
|
|
|
HWND hWndParent,
|
|
|
|
HMENU hMenu,
|
|
|
|
HINSTANCE hInstance,
|
|
|
|
LPVOID lpParam)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2006-07-04 18:26:49 +00:00
|
|
|
return User32CreateWindowEx(dwExStyle,
|
|
|
|
(LPCSTR) lpClassName,
|
|
|
|
(LPCSTR) lpWindowName,
|
|
|
|
dwStyle,
|
|
|
|
x,
|
|
|
|
y,
|
|
|
|
nWidth,
|
|
|
|
nHeight,
|
|
|
|
hWndParent,
|
|
|
|
hMenu,
|
|
|
|
hInstance,
|
|
|
|
lpParam,
|
|
|
|
TRUE);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2002-01-13 22:52:08 +00:00
|
|
|
HDWP STDCALL
|
|
|
|
DeferWindowPos(HDWP hWinPosInfo,
|
|
|
|
HWND hWnd,
|
|
|
|
HWND hWndInsertAfter,
|
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int cx,
|
|
|
|
int cy,
|
|
|
|
UINT uFlags)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-10-19 19:51:48 +00:00
|
|
|
#if 0
|
2003-08-04 16:56:49 +00:00
|
|
|
return NtUserDeferWindowPos(hWinPosInfo, hWnd, hWndInsertAfter, x, y, cx, cy, uFlags);
|
2003-10-19 19:51:48 +00:00
|
|
|
#else
|
|
|
|
SetWindowPos(hWnd, hWndInsertAfter, x, y, cx, cy, uFlags);
|
|
|
|
return hWinPosInfo;
|
|
|
|
#endif
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
DestroyWindow(HWND hWnd)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-03-06 23:57:03 +00:00
|
|
|
return NtUserDestroyWindow(hWnd);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
EndDeferWindowPos(HDWP hWinPosInfo)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-10-19 19:51:48 +00:00
|
|
|
#if 0
|
2003-05-12 19:30:00 +00:00
|
|
|
UNIMPLEMENTED;
|
2001-06-12 17:51:51 +00:00
|
|
|
return FALSE;
|
2003-10-19 19:51:48 +00:00
|
|
|
#else
|
|
|
|
return TRUE;
|
|
|
|
#endif
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
2003-08-20 03:07:33 +00:00
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
|
|
|
HWND STDCALL
|
|
|
|
GetDesktopWindow(VOID)
|
|
|
|
{
|
|
|
|
return NtUserGetDesktopWindow();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
HWND STDCALL
|
|
|
|
GetForegroundWindow(VOID)
|
|
|
|
{
|
2003-11-30 20:03:47 +00:00
|
|
|
return NtUserGetForegroundWindow();
|
2003-08-20 03:07:33 +00:00
|
|
|
}
|
|
|
|
|
2005-11-22 00:05:23 +00:00
|
|
|
static
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL
|
2003-07-25 23:02:21 +00:00
|
|
|
User32EnumWindows (
|
|
|
|
HDESK hDesktop,
|
|
|
|
HWND hWndparent,
|
2005-07-27 19:21:46 +00:00
|
|
|
WNDENUMPROC lpfn,
|
2003-07-25 23:02:21 +00:00
|
|
|
LPARAM lParam,
|
|
|
|
DWORD dwThreadId,
|
|
|
|
BOOL bChildren )
|
|
|
|
{
|
|
|
|
DWORD i, dwCount = 0;
|
|
|
|
HWND* pHwnd = NULL;
|
|
|
|
HANDLE hHeap;
|
|
|
|
|
|
|
|
if ( !lpfn )
|
|
|
|
{
|
|
|
|
SetLastError ( ERROR_INVALID_PARAMETER );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* FIXME instead of always making two calls, should we use some
|
|
|
|
sort of persistent buffer and only grow it ( requiring a 2nd
|
|
|
|
call ) when the buffer wasn't already big enough? */
|
|
|
|
/* first get how many window entries there are */
|
|
|
|
SetLastError(0);
|
|
|
|
dwCount = NtUserBuildHwndList (
|
|
|
|
hDesktop, hWndparent, bChildren, dwThreadId, lParam, NULL, 0 );
|
|
|
|
if ( !dwCount || GetLastError() )
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
/* allocate buffer to receive HWND handles */
|
|
|
|
hHeap = GetProcessHeap();
|
|
|
|
pHwnd = HeapAlloc ( hHeap, 0, sizeof(HWND)*(dwCount+1) );
|
|
|
|
if ( !pHwnd )
|
|
|
|
{
|
|
|
|
SetLastError ( ERROR_NOT_ENOUGH_MEMORY );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* now call kernel again to fill the buffer this time */
|
|
|
|
dwCount = NtUserBuildHwndList (
|
|
|
|
hDesktop, hWndparent, bChildren, dwThreadId, lParam, pHwnd, dwCount );
|
|
|
|
if ( !dwCount || GetLastError() )
|
|
|
|
{
|
|
|
|
if ( pHwnd )
|
|
|
|
HeapFree ( hHeap, 0, pHwnd );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* call the user's callback function until we're done or
|
|
|
|
they tell us to quit */
|
|
|
|
for ( i = 0; i < dwCount; i++ )
|
|
|
|
{
|
|
|
|
/* FIXME I'm only getting NULLs from Thread Enumeration, and it's
|
|
|
|
* probably because I'm not doing it right in NtUserBuildHwndList.
|
|
|
|
* Once that's fixed, we shouldn't have to check for a NULL HWND
|
|
|
|
* here
|
|
|
|
*/
|
|
|
|
if ( !(ULONG)pHwnd[i] ) /* don't enumerate a NULL HWND */
|
|
|
|
continue;
|
|
|
|
if ( !(*lpfn)( pHwnd[i], lParam ) )
|
2003-09-20 19:52:23 +00:00
|
|
|
{
|
|
|
|
HeapFree ( hHeap, 0, pHwnd );
|
|
|
|
return FALSE;
|
|
|
|
}
|
2003-07-25 23:02:21 +00:00
|
|
|
}
|
|
|
|
if ( pHwnd )
|
|
|
|
HeapFree ( hHeap, 0, pHwnd );
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
/*
|
2003-07-25 23:02:21 +00:00
|
|
|
* @implemented
|
2003-07-10 21:04:32 +00:00
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL
|
2003-07-25 23:02:21 +00:00
|
|
|
STDCALL
|
|
|
|
EnumChildWindows(
|
|
|
|
HWND hWndParent,
|
2005-07-27 19:21:46 +00:00
|
|
|
WNDENUMPROC lpEnumFunc,
|
2003-07-25 23:02:21 +00:00
|
|
|
LPARAM lParam)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-07-25 23:02:21 +00:00
|
|
|
if ( !hWndParent )
|
2007-02-28 13:21:09 +00:00
|
|
|
{
|
|
|
|
return EnumWindows(lpEnumFunc, lParam);
|
|
|
|
}
|
|
|
|
return User32EnumWindows ( NULL, hWndParent, lpEnumFunc, lParam, 0, TRUE );
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
2003-07-25 23:02:21 +00:00
|
|
|
* @implemented
|
2003-07-10 21:04:32 +00:00
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL
|
2003-07-25 23:02:21 +00:00
|
|
|
STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
EnumThreadWindows(DWORD dwThreadId,
|
2005-07-27 19:21:46 +00:00
|
|
|
WNDENUMPROC lpfn,
|
2002-01-13 22:52:08 +00:00
|
|
|
LPARAM lParam)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-07-25 23:02:21 +00:00
|
|
|
if ( !dwThreadId )
|
|
|
|
dwThreadId = GetCurrentThreadId();
|
|
|
|
return User32EnumWindows ( NULL, NULL, lpfn, lParam, dwThreadId, FALSE );
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
2003-07-25 23:02:21 +00:00
|
|
|
* @implemented
|
2003-07-10 21:04:32 +00:00
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2005-07-27 19:21:46 +00:00
|
|
|
EnumWindows(WNDENUMPROC lpEnumFunc,
|
2002-01-13 22:52:08 +00:00
|
|
|
LPARAM lParam)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-07-25 23:02:21 +00:00
|
|
|
return User32EnumWindows ( NULL, NULL, lpEnumFunc, lParam, 0, FALSE );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL
|
2003-07-25 23:02:21 +00:00
|
|
|
STDCALL
|
|
|
|
EnumDesktopWindows(
|
|
|
|
HDESK hDesktop,
|
2005-07-27 19:21:46 +00:00
|
|
|
WNDENUMPROC lpfn,
|
2003-07-25 23:02:21 +00:00
|
|
|
LPARAM lParam)
|
|
|
|
{
|
|
|
|
return User32EnumWindows ( hDesktop, NULL, lpfn, lParam, 0, FALSE );
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
2004-04-14 23:17:56 +00:00
|
|
|
* @implemented
|
2003-07-10 21:04:32 +00:00
|
|
|
*/
|
2002-01-13 22:52:08 +00:00
|
|
|
HWND STDCALL
|
|
|
|
FindWindowExA(HWND hwndParent,
|
|
|
|
HWND hwndChildAfter,
|
|
|
|
LPCSTR lpszClass,
|
|
|
|
LPCSTR lpszWindow)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2006-05-21 09:21:38 +00:00
|
|
|
UNICODE_STRING ucClassName, *pucClassName = NULL;
|
|
|
|
UNICODE_STRING ucWindowName, *pucWindowName = NULL;
|
2003-12-07 18:54:15 +00:00
|
|
|
HWND Result;
|
|
|
|
|
2006-05-21 09:21:38 +00:00
|
|
|
if (IS_ATOM(lpszClass))
|
2003-12-07 18:54:15 +00:00
|
|
|
{
|
|
|
|
ucClassName.Buffer = (LPWSTR)lpszClass;
|
|
|
|
ucClassName.Length = 0;
|
2006-05-21 09:21:38 +00:00
|
|
|
pucClassName = &ucClassName;
|
2005-05-09 01:42:07 +00:00
|
|
|
}
|
2006-05-21 09:21:38 +00:00
|
|
|
else if (lpszClass != NULL)
|
2003-12-07 18:54:15 +00:00
|
|
|
{
|
2006-05-21 09:21:38 +00:00
|
|
|
if (!RtlCreateUnicodeStringFromAsciiz(&ucClassName,
|
|
|
|
(LPSTR)lpszClass))
|
|
|
|
{
|
|
|
|
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
pucClassName = &ucClassName;
|
2003-12-07 18:54:15 +00:00
|
|
|
}
|
|
|
|
|
2006-05-21 09:21:38 +00:00
|
|
|
if (lpszWindow != NULL)
|
|
|
|
{
|
|
|
|
if (!RtlCreateUnicodeStringFromAsciiz(&ucWindowName,
|
|
|
|
(LPSTR)lpszWindow))
|
|
|
|
{
|
|
|
|
if (!IS_ATOM(lpszClass) && lpszClass != NULL)
|
|
|
|
RtlFreeUnicodeString(&ucWindowName);
|
|
|
|
|
|
|
|
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
|
|
|
return NULL;
|
|
|
|
}
|
2003-12-07 18:54:15 +00:00
|
|
|
|
2006-05-21 09:21:38 +00:00
|
|
|
pucWindowName = &ucWindowName;
|
|
|
|
}
|
2003-12-07 18:54:15 +00:00
|
|
|
|
2006-05-21 09:21:38 +00:00
|
|
|
Result = NtUserFindWindowEx(hwndParent,
|
|
|
|
hwndChildAfter,
|
|
|
|
pucClassName,
|
|
|
|
pucWindowName);
|
|
|
|
|
|
|
|
if (!IS_ATOM(lpszClass) && lpszClass != NULL)
|
2003-12-07 18:54:15 +00:00
|
|
|
RtlFreeUnicodeString(&ucClassName);
|
2006-05-21 09:21:38 +00:00
|
|
|
if (lpszWindow != NULL)
|
|
|
|
RtlFreeUnicodeString(&ucWindowName);
|
2003-12-07 18:54:15 +00:00
|
|
|
|
|
|
|
return Result;
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2002-01-13 22:52:08 +00:00
|
|
|
HWND STDCALL
|
|
|
|
FindWindowExW(HWND hwndParent,
|
|
|
|
HWND hwndChildAfter,
|
|
|
|
LPCWSTR lpszClass,
|
|
|
|
LPCWSTR lpszWindow)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2006-05-21 09:21:38 +00:00
|
|
|
UNICODE_STRING ucClassName, *pucClassName = NULL;
|
|
|
|
UNICODE_STRING ucWindowName, *pucWindowName = NULL;
|
2003-06-15 04:25:34 +00:00
|
|
|
|
2006-05-21 09:21:38 +00:00
|
|
|
if (IS_ATOM(lpszClass))
|
2004-04-10 07:37:28 +00:00
|
|
|
{
|
|
|
|
ucClassName.Length = 0;
|
|
|
|
ucClassName.Buffer = (LPWSTR)lpszClass;
|
2006-05-21 09:21:38 +00:00
|
|
|
pucClassName = &ucClassName;
|
2005-05-09 01:42:07 +00:00
|
|
|
}
|
2006-05-21 09:21:38 +00:00
|
|
|
else if (lpszClass != NULL)
|
2004-04-10 07:37:28 +00:00
|
|
|
{
|
2006-05-21 09:21:38 +00:00
|
|
|
RtlInitUnicodeString(&ucClassName,
|
|
|
|
lpszClass);
|
|
|
|
pucClassName = &ucClassName;
|
2004-04-10 07:37:28 +00:00
|
|
|
}
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2006-05-21 09:21:38 +00:00
|
|
|
if (lpszWindow != NULL)
|
|
|
|
{
|
|
|
|
RtlInitUnicodeString(&ucWindowName,
|
|
|
|
lpszWindow);
|
|
|
|
pucWindowName = &ucWindowName;
|
|
|
|
}
|
2003-07-10 00:24:04 +00:00
|
|
|
|
2006-05-21 09:21:38 +00:00
|
|
|
return NtUserFindWindowEx(hwndParent,
|
|
|
|
hwndChildAfter,
|
|
|
|
pucClassName,
|
|
|
|
pucWindowName);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-08-20 03:07:33 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
|
|
|
HWND STDCALL
|
|
|
|
FindWindowA(LPCSTR lpClassName, LPCSTR lpWindowName)
|
|
|
|
{
|
|
|
|
//FIXME: FindWindow does not search children, but FindWindowEx does.
|
|
|
|
// what should we do about this?
|
|
|
|
return FindWindowExA (NULL, NULL, lpClassName, lpWindowName);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
|
|
|
HWND STDCALL
|
|
|
|
FindWindowW(LPCWSTR lpClassName, LPCWSTR lpWindowName)
|
|
|
|
{
|
2005-05-09 01:42:07 +00:00
|
|
|
/*
|
|
|
|
|
2003-08-20 03:07:33 +00:00
|
|
|
There was a FIXME here earlier, but I think it is just a documentation unclarity.
|
|
|
|
|
2005-05-09 01:42:07 +00:00
|
|
|
FindWindow only searches top level windows. What they mean is that child
|
|
|
|
windows of other windows than the desktop can be searched.
|
2003-08-20 03:07:33 +00:00
|
|
|
FindWindowExW never does a recursive search.
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2003-08-20 03:07:33 +00:00
|
|
|
/ Joakim
|
|
|
|
*/
|
|
|
|
|
|
|
|
return FindWindowExW (NULL, NULL, lpClassName, lpWindowName);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
GetAltTabInfoA(HWND hwnd,
|
|
|
|
int iItem,
|
|
|
|
PALTTABINFO pati,
|
|
|
|
LPSTR pszItemText,
|
|
|
|
UINT cchItemText)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-05-12 19:30:00 +00:00
|
|
|
UNIMPLEMENTED;
|
2001-06-12 17:51:51 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
GetAltTabInfoW(HWND hwnd,
|
|
|
|
int iItem,
|
|
|
|
PALTTABINFO pati,
|
|
|
|
LPWSTR pszItemText,
|
|
|
|
UINT cchItemText)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-05-12 19:30:00 +00:00
|
|
|
UNIMPLEMENTED;
|
2001-06-12 17:51:51 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2002-01-13 22:52:08 +00:00
|
|
|
HWND STDCALL
|
2002-08-30 02:47:37 +00:00
|
|
|
GetAncestor(HWND hwnd, UINT gaFlags)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2002-08-30 02:47:37 +00:00
|
|
|
return(NtUserGetAncestor(hwnd, gaFlags));
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-09-17 23:46:23 +00:00
|
|
|
GetClientRect(HWND hWnd, LPRECT lpRect)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-03-06 21:03:49 +00:00
|
|
|
return(NtUserGetClientRect(hWnd, lpRect));
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
2003-11-18 23:33:31 +00:00
|
|
|
* @implemented
|
2003-07-10 21:04:32 +00:00
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
GetGUIThreadInfo(DWORD idThread,
|
2002-09-08 10:23:54 +00:00
|
|
|
LPGUITHREADINFO lpgui)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2004-01-23 23:38:26 +00:00
|
|
|
return (BOOL)NtUserGetGUIThreadInfo(idThread, lpgui);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2002-01-13 22:52:08 +00:00
|
|
|
HWND STDCALL
|
|
|
|
GetLastActivePopup(HWND hWnd)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-08-04 16:56:49 +00:00
|
|
|
return NtUserGetLastActivePopup(hWnd);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2002-01-13 22:52:08 +00:00
|
|
|
HWND STDCALL
|
|
|
|
GetParent(HWND hWnd)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-08-04 16:56:49 +00:00
|
|
|
return NtUserGetParent(hWnd);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
GetProcessDefaultLayout(DWORD *pdwDefaultLayout)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-05-12 19:30:00 +00:00
|
|
|
UNIMPLEMENTED;
|
2001-06-12 17:51:51 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
GetTitleBarInfo(HWND hwnd,
|
|
|
|
PTITLEBARINFO pti)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-05-12 19:30:00 +00:00
|
|
|
UNIMPLEMENTED;
|
2001-06-12 17:51:51 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
2003-08-04 16:56:49 +00:00
|
|
|
* @implemented
|
2003-07-10 21:04:32 +00:00
|
|
|
*/
|
2002-01-13 22:52:08 +00:00
|
|
|
HWND STDCALL
|
2003-08-20 03:07:33 +00:00
|
|
|
GetWindow(HWND hWnd,
|
|
|
|
UINT uCmd)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-08-20 03:07:33 +00:00
|
|
|
return NtUserGetWindow(hWnd, uCmd);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
2003-08-04 16:56:49 +00:00
|
|
|
* @implemented
|
2003-07-10 21:04:32 +00:00
|
|
|
*/
|
2002-01-13 22:52:08 +00:00
|
|
|
HWND STDCALL
|
2003-08-20 03:07:33 +00:00
|
|
|
GetTopWindow(HWND hWnd)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-08-20 03:07:33 +00:00
|
|
|
if (!hWnd) hWnd = GetDesktopWindow();
|
|
|
|
return GetWindow( hWnd, GW_CHILD );
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
2004-04-02 20:51:08 +00:00
|
|
|
* @implemented
|
2003-07-10 21:04:32 +00:00
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
GetWindowInfo(HWND hwnd,
|
|
|
|
PWINDOWINFO pwi)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2004-04-02 20:51:08 +00:00
|
|
|
return NtUserGetWindowInfo(hwnd, pwi);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
2004-04-02 22:16:09 +00:00
|
|
|
* @implemented
|
2003-07-10 21:04:32 +00:00
|
|
|
*/
|
2002-01-13 22:52:08 +00:00
|
|
|
UINT STDCALL
|
|
|
|
GetWindowModuleFileNameA(HWND hwnd,
|
|
|
|
LPSTR lpszFileName,
|
|
|
|
UINT cchFileNameMax)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2004-04-02 22:16:09 +00:00
|
|
|
HINSTANCE hWndInst;
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2004-04-02 22:16:09 +00:00
|
|
|
if(!(hWndInst = NtUserGetWindowInstance(hwnd)))
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2004-04-02 22:16:09 +00:00
|
|
|
return GetModuleFileNameA(hWndInst, lpszFileName, cchFileNameMax);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
2004-04-02 22:16:09 +00:00
|
|
|
* @implemented
|
2003-07-10 21:04:32 +00:00
|
|
|
*/
|
2002-01-13 22:52:08 +00:00
|
|
|
UINT STDCALL
|
|
|
|
GetWindowModuleFileNameW(HWND hwnd,
|
|
|
|
LPWSTR lpszFileName,
|
|
|
|
UINT cchFileNameMax)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2004-04-02 22:16:09 +00:00
|
|
|
HINSTANCE hWndInst;
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2004-04-02 22:16:09 +00:00
|
|
|
if(!(hWndInst = NtUserGetWindowInstance(hwnd)))
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2004-04-02 22:16:09 +00:00
|
|
|
return GetModuleFileNameW(hWndInst, lpszFileName, cchFileNameMax);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
2003-12-19 23:20:06 +00:00
|
|
|
* @implemented
|
2003-07-10 21:04:32 +00:00
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
GetWindowPlacement(HWND hWnd,
|
|
|
|
WINDOWPLACEMENT *lpwndpl)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2004-01-23 23:38:26 +00:00
|
|
|
return (BOOL)NtUserGetWindowPlacement(hWnd, lpwndpl);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
GetWindowRect(HWND hWnd,
|
|
|
|
LPRECT lpRect)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2002-08-31 23:18:47 +00:00
|
|
|
return(NtUserGetWindowRect(hWnd, lpRect));
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2002-01-13 22:52:08 +00:00
|
|
|
int STDCALL
|
2002-09-03 22:44:21 +00:00
|
|
|
GetWindowTextA(HWND hWnd, LPSTR lpString, int nMaxCount)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2005-09-20 09:31:13 +00:00
|
|
|
DWORD ProcessId;
|
|
|
|
|
|
|
|
if (lpString == NULL)
|
|
|
|
return 0;
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2005-09-20 09:31:13 +00:00
|
|
|
if (!NtUserGetWindowThreadProcessId(hWnd, &ProcessId))
|
|
|
|
return 0;
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2005-09-20 09:31:13 +00:00
|
|
|
if (ProcessId != GetCurrentProcessId())
|
|
|
|
{
|
|
|
|
/* do not send WM_GETTEXT messages to other processes */
|
|
|
|
LPWSTR Buffer;
|
|
|
|
INT Length;
|
|
|
|
|
|
|
|
Buffer = HeapAlloc(GetProcessHeap(), 0, nMaxCount * sizeof(WCHAR));
|
|
|
|
if (!Buffer)
|
|
|
|
return FALSE;
|
|
|
|
Length = NtUserInternalGetWindowText(hWnd, Buffer, nMaxCount);
|
|
|
|
if (Length > 0 && nMaxCount > 0 &&
|
|
|
|
!WideCharToMultiByte(CP_ACP, 0, Buffer, -1,
|
|
|
|
lpString, nMaxCount, NULL, NULL))
|
|
|
|
{
|
|
|
|
lpString[0] = '\0';
|
|
|
|
}
|
|
|
|
HeapFree(GetProcessHeap(), 0, Buffer);
|
|
|
|
|
|
|
|
return (LRESULT)Length;
|
|
|
|
}
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2005-09-20 09:31:13 +00:00
|
|
|
return SendMessageA(hWnd, WM_GETTEXT, nMaxCount, (LPARAM)lpString);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2002-01-13 22:52:08 +00:00
|
|
|
int STDCALL
|
|
|
|
GetWindowTextLengthA(HWND hWnd)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2004-04-15 23:36:03 +00:00
|
|
|
DWORD ProcessId;
|
|
|
|
if(!NtUserGetWindowThreadProcessId(hWnd, &ProcessId))
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2004-04-15 23:36:03 +00:00
|
|
|
if(ProcessId == GetCurrentProcessId())
|
|
|
|
{
|
|
|
|
return(SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0));
|
|
|
|
}
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2004-04-15 23:36:03 +00:00
|
|
|
/* do not send WM_GETTEXT messages to other processes */
|
|
|
|
return (LRESULT)NtUserInternalGetWindowText(hWnd, NULL, 0);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
2003-08-08 02:57:54 +00:00
|
|
|
* @implemented
|
2003-07-10 21:04:32 +00:00
|
|
|
*/
|
2002-01-13 22:52:08 +00:00
|
|
|
int STDCALL
|
|
|
|
GetWindowTextLengthW(HWND hWnd)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2004-04-15 23:36:03 +00:00
|
|
|
DWORD ProcessId;
|
|
|
|
if(!NtUserGetWindowThreadProcessId(hWnd, &ProcessId))
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2004-04-15 23:36:03 +00:00
|
|
|
if(ProcessId == GetCurrentProcessId())
|
|
|
|
{
|
|
|
|
return(SendMessageW(hWnd, WM_GETTEXTLENGTH, 0, 0));
|
|
|
|
}
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2004-04-15 23:36:03 +00:00
|
|
|
/* do not send WM_GETTEXT messages to other processes */
|
|
|
|
return (LRESULT)NtUserInternalGetWindowText(hWnd, NULL, 0);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
2003-08-07 04:03:25 +00:00
|
|
|
* @implemented
|
2003-07-10 21:04:32 +00:00
|
|
|
*/
|
2002-01-13 22:52:08 +00:00
|
|
|
int STDCALL
|
2005-09-20 09:31:13 +00:00
|
|
|
GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2005-09-20 09:31:13 +00:00
|
|
|
DWORD ProcessId;
|
|
|
|
|
|
|
|
if (lpString == NULL)
|
|
|
|
return 0;
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2005-09-20 09:31:13 +00:00
|
|
|
if (!NtUserGetWindowThreadProcessId(hWnd, &ProcessId))
|
|
|
|
return 0;
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2005-09-20 09:31:13 +00:00
|
|
|
if (ProcessId == GetCurrentProcessId())
|
|
|
|
return SendMessageW(hWnd, WM_GETTEXT, nMaxCount, (LPARAM)lpString);
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2005-09-20 09:31:13 +00:00
|
|
|
return NtUserInternalGetWindowText(hWnd, lpString, nMaxCount);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2002-01-13 22:52:08 +00:00
|
|
|
DWORD STDCALL
|
|
|
|
GetWindowThreadProcessId(HWND hWnd,
|
|
|
|
LPDWORD lpdwProcessId)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-07-25 19:37:14 +00:00
|
|
|
return NtUserGetWindowThreadProcessId(hWnd, lpdwProcessId);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
2003-08-17 22:45:40 +00:00
|
|
|
* @implemented
|
2003-07-10 21:04:32 +00:00
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
IsChild(HWND hWndParent,
|
|
|
|
HWND hWnd)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2004-04-07 08:25:40 +00:00
|
|
|
if (! IsWindow(hWndParent) || ! IsWindow(hWnd))
|
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2005-05-09 01:42:07 +00:00
|
|
|
do
|
2004-01-15 20:59:57 +00:00
|
|
|
{
|
|
|
|
hWnd = (HWND)NtUserGetWindowLong(hWnd, GWL_HWNDPARENT, FALSE);
|
|
|
|
}
|
|
|
|
while (hWnd != NULL && hWnd != hWndParent);
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2004-01-15 20:59:57 +00:00
|
|
|
return hWnd == hWndParent;
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
2003-07-23 06:14:12 +00:00
|
|
|
* @implemented
|
2003-07-10 21:04:32 +00:00
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
IsIconic(HWND hWnd)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2005-05-09 01:42:07 +00:00
|
|
|
return (NtUserGetWindowLong( hWnd, GWL_STYLE, FALSE) & WS_MINIMIZE) != 0;
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
IsWindow(HWND hWnd)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-08-05 15:41:03 +00:00
|
|
|
DWORD WndProc = NtUserGetWindowLong(hWnd, GWL_WNDPROC, FALSE);
|
2004-03-14 11:27:33 +00:00
|
|
|
return (0 != WndProc || ERROR_INVALID_WINDOW_HANDLE != GetLastError());
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
2003-08-09 07:09:57 +00:00
|
|
|
* @implemented
|
2003-07-10 21:04:32 +00:00
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
IsWindowUnicode(HWND hWnd)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2004-01-26 08:44:51 +00:00
|
|
|
return NtUserIsWindowUnicode(hWnd);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
IsWindowVisible(HWND hWnd)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-08-17 22:45:40 +00:00
|
|
|
while (NtUserGetWindowLong(hWnd, GWL_STYLE, FALSE) & WS_CHILD)
|
2002-08-30 02:47:37 +00:00
|
|
|
{
|
2003-08-17 22:45:40 +00:00
|
|
|
if (!(NtUserGetWindowLong(hWnd, GWL_STYLE, FALSE) & WS_VISIBLE))
|
2002-08-30 02:47:37 +00:00
|
|
|
{
|
|
|
|
return(FALSE);
|
|
|
|
}
|
|
|
|
hWnd = GetAncestor(hWnd, GA_PARENT);
|
|
|
|
}
|
2003-08-17 22:45:40 +00:00
|
|
|
return(NtUserGetWindowLong(hWnd, GWL_STYLE, FALSE) & WS_VISIBLE);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
2003-08-17 20:29:57 +00:00
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL
|
2003-08-17 20:29:57 +00:00
|
|
|
STDCALL
|
|
|
|
IsWindowEnabled(
|
|
|
|
HWND hWnd)
|
|
|
|
{
|
|
|
|
// AG: I don't know if child windows are affected if the parent is
|
|
|
|
// disabled. I think they stop processing messages but stay appearing
|
|
|
|
// as enabled.
|
2003-12-22 11:37:32 +00:00
|
|
|
|
2003-08-17 22:45:40 +00:00
|
|
|
return (! (NtUserGetWindowLong(hWnd, GWL_STYLE, FALSE) & WS_DISABLED));
|
2003-08-17 20:29:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
IsZoomed(HWND hWnd)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-08-17 22:45:40 +00:00
|
|
|
return NtUserGetWindowLong(hWnd, GWL_STYLE, FALSE) & WS_MAXIMIZE;
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
LockSetForegroundWindow(UINT uLockCode)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-05-12 19:30:00 +00:00
|
|
|
UNIMPLEMENTED;
|
2001-06-12 17:51:51 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
MoveWindow(HWND hWnd,
|
|
|
|
int X,
|
|
|
|
int Y,
|
|
|
|
int nWidth,
|
|
|
|
int nHeight,
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL bRepaint)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-05-12 19:30:00 +00:00
|
|
|
return NtUserMoveWindow(hWnd, X, Y, nWidth, nHeight, bRepaint);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
2003-08-20 03:07:33 +00:00
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2003-08-20 03:07:33 +00:00
|
|
|
AnimateWindow(HWND hwnd,
|
|
|
|
DWORD dwTime,
|
|
|
|
DWORD dwFlags)
|
|
|
|
{
|
|
|
|
/* FIXME Add animation code */
|
|
|
|
|
|
|
|
/* If trying to show/hide and it's already *
|
|
|
|
* shown/hidden or invalid window, fail with *
|
|
|
|
* invalid parameter */
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2003-08-20 03:07:33 +00:00
|
|
|
BOOL visible;
|
|
|
|
visible = IsWindowVisible(hwnd);
|
2005-07-18 03:13:11 +00:00
|
|
|
if(!IsWindow(hwnd) ||
|
|
|
|
(visible && !(dwFlags & AW_HIDE)) ||
|
|
|
|
(!visible && (dwFlags & AW_HIDE)))
|
2003-08-20 03:07:33 +00:00
|
|
|
{
|
|
|
|
SetLastError(ERROR_INVALID_PARAMETER);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2005-07-18 03:13:11 +00:00
|
|
|
ShowWindow(hwnd, (dwFlags & AW_HIDE) ? SW_HIDE : ((dwFlags & AW_ACTIVATE) ? SW_SHOW : SW_SHOWNA));
|
2003-08-20 03:07:33 +00:00
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
/*
|
2003-12-10 03:59:18 +00:00
|
|
|
* @implemented
|
2003-07-10 21:04:32 +00:00
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
OpenIcon(HWND hWnd)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-12-10 16:08:49 +00:00
|
|
|
if (!(NtUserGetWindowLong(hWnd, GWL_STYLE, FALSE) & WS_MINIMIZE))
|
2003-08-17 22:45:40 +00:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2003-12-10 03:59:18 +00:00
|
|
|
ShowWindow(hWnd,SW_RESTORE);
|
2003-12-10 05:41:21 +00:00
|
|
|
return TRUE;
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2002-01-13 22:52:08 +00:00
|
|
|
HWND STDCALL
|
|
|
|
RealChildWindowFromPoint(HWND hwndParent,
|
|
|
|
POINT ptParentClientCoords)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-05-12 19:30:00 +00:00
|
|
|
UNIMPLEMENTED;
|
2001-06-12 17:51:51 +00:00
|
|
|
return (HWND)0;
|
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
SetForegroundWindow(HWND hWnd)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-11-30 20:03:47 +00:00
|
|
|
return NtUserCallHwndLock(hWnd, HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOW);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
SetLayeredWindowAttributes(HWND hwnd,
|
|
|
|
COLORREF crKey,
|
|
|
|
BYTE bAlpha,
|
|
|
|
DWORD dwFlags)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-05-12 19:30:00 +00:00
|
|
|
UNIMPLEMENTED;
|
2001-06-12 17:51:51 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
2005-08-06 05:25:13 +00:00
|
|
|
* @implemented
|
2003-07-10 21:04:32 +00:00
|
|
|
*/
|
2002-01-13 22:52:08 +00:00
|
|
|
HWND STDCALL
|
|
|
|
SetParent(HWND hWndChild,
|
|
|
|
HWND hWndNewParent)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-08-11 19:14:16 +00:00
|
|
|
return NtUserSetParent(hWndChild, hWndNewParent);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
SetProcessDefaultLayout(DWORD dwDefaultLayout)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-05-12 19:30:00 +00:00
|
|
|
UNIMPLEMENTED;
|
2001-06-12 17:51:51 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
SetWindowPlacement(HWND hWnd,
|
|
|
|
CONST WINDOWPLACEMENT *lpwndpl)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2004-01-23 23:38:26 +00:00
|
|
|
return (BOOL)NtUserSetWindowPlacement(hWnd, (WINDOWPLACEMENT *)lpwndpl);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
SetWindowPos(HWND hWnd,
|
|
|
|
HWND hWndInsertAfter,
|
|
|
|
int X,
|
|
|
|
int Y,
|
|
|
|
int cx,
|
|
|
|
int cy,
|
|
|
|
UINT uFlags)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-05-18 07:51:41 +00:00
|
|
|
return NtUserSetWindowPos(hWnd,hWndInsertAfter, X, Y, cx, cy, uFlags);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
SetWindowTextA(HWND hWnd,
|
|
|
|
LPCSTR lpString)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2004-04-15 23:36:03 +00:00
|
|
|
DWORD ProcessId;
|
|
|
|
if(!NtUserGetWindowThreadProcessId(hWnd, &ProcessId))
|
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2004-04-15 23:36:03 +00:00
|
|
|
if(ProcessId != GetCurrentProcessId())
|
|
|
|
{
|
|
|
|
/* do not send WM_GETTEXT messages to other processes */
|
|
|
|
ANSI_STRING AnsiString;
|
|
|
|
UNICODE_STRING UnicodeString;
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2004-04-15 23:36:03 +00:00
|
|
|
if(lpString)
|
|
|
|
{
|
|
|
|
RtlInitAnsiString(&AnsiString, (LPSTR)lpString);
|
|
|
|
RtlAnsiStringToUnicodeString(&UnicodeString, &AnsiString, TRUE);
|
|
|
|
NtUserDefSetText(hWnd, &UnicodeString);
|
|
|
|
RtlFreeUnicodeString(&UnicodeString);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
NtUserDefSetText(hWnd, NULL);
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2004-04-15 23:36:03 +00:00
|
|
|
if ((GetWindowLongW(hWnd, GWL_STYLE) & WS_CAPTION) == WS_CAPTION)
|
|
|
|
{
|
2005-03-21 01:59:21 +00:00
|
|
|
DefWndNCPaint(hWnd, (HRGN)1, -1);
|
2004-04-15 23:36:03 +00:00
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2003-05-19 20:11:17 +00:00
|
|
|
return SendMessageA(hWnd, WM_SETTEXT, 0, (LPARAM)lpString);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
SetWindowTextW(HWND hWnd,
|
|
|
|
LPCWSTR lpString)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2004-04-15 23:36:03 +00:00
|
|
|
DWORD ProcessId;
|
|
|
|
if(!NtUserGetWindowThreadProcessId(hWnd, &ProcessId))
|
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2004-04-15 23:36:03 +00:00
|
|
|
if(ProcessId != GetCurrentProcessId())
|
|
|
|
{
|
|
|
|
/* do not send WM_GETTEXT messages to other processes */
|
|
|
|
UNICODE_STRING UnicodeString;
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2004-04-15 23:36:03 +00:00
|
|
|
if(lpString)
|
|
|
|
RtlInitUnicodeString(&UnicodeString, (LPWSTR)lpString);
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2004-04-15 23:36:03 +00:00
|
|
|
NtUserDefSetText(hWnd, (lpString ? &UnicodeString : NULL));
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2004-04-15 23:36:03 +00:00
|
|
|
if ((GetWindowLongW(hWnd, GWL_STYLE) & WS_CAPTION) == WS_CAPTION)
|
|
|
|
{
|
2005-03-21 01:59:21 +00:00
|
|
|
DefWndNCPaint(hWnd, (HRGN)1, -1);
|
2004-04-15 23:36:03 +00:00
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|
2005-05-09 01:42:07 +00:00
|
|
|
|
2003-05-19 20:11:17 +00:00
|
|
|
return SendMessageW(hWnd, WM_SETTEXT, 0, (LPARAM)lpString);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
2005-07-18 03:13:11 +00:00
|
|
|
* @implemented
|
2003-07-10 21:04:32 +00:00
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
ShowOwnedPopups(HWND hWnd,
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL fShow)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2005-07-18 03:13:11 +00:00
|
|
|
return (BOOL)NtUserCallTwoParam((DWORD)hWnd, fShow, TWOPARAM_ROUTINE_SHOWOWNEDPOPUPS);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
ShowWindow(HWND hWnd,
|
|
|
|
int nCmdShow)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
|
|
|
return NtUserShowWindow(hWnd, nCmdShow);
|
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
ShowWindowAsync(HWND hWnd,
|
|
|
|
int nCmdShow)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2005-10-05 14:47:07 +00:00
|
|
|
return NtUserShowWindowAsync(hWnd, nCmdShow);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2003-11-02 06:58:57 +00:00
|
|
|
/*
|
2002-01-13 22:52:08 +00:00
|
|
|
WORD STDCALL
|
|
|
|
TileWindows(HWND hwndParent,
|
|
|
|
UINT wHow,
|
|
|
|
CONST RECT *lpRect,
|
|
|
|
UINT cKids,
|
|
|
|
const HWND *lpKids)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-05-12 19:30:00 +00:00
|
|
|
UNIMPLEMENTED;
|
2001-06-12 17:51:51 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2003-11-02 06:58:57 +00:00
|
|
|
*/
|
2001-06-12 17:51:51 +00:00
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
UpdateLayeredWindow(HWND hwnd,
|
|
|
|
HDC hdcDst,
|
|
|
|
POINT *pptDst,
|
|
|
|
SIZE *psize,
|
|
|
|
HDC hdcSrc,
|
|
|
|
POINT *pptSrc,
|
|
|
|
COLORREF crKey,
|
|
|
|
BLENDFUNCTION *pblend,
|
|
|
|
DWORD dwFlags)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2003-05-12 19:30:00 +00:00
|
|
|
UNIMPLEMENTED;
|
2001-06-12 17:51:51 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
2003-10-30 21:58:42 +00:00
|
|
|
* @implemented
|
2003-07-10 21:04:32 +00:00
|
|
|
*/
|
2002-01-13 22:52:08 +00:00
|
|
|
HWND STDCALL
|
|
|
|
WindowFromPoint(POINT Point)
|
2001-06-12 17:51:51 +00:00
|
|
|
{
|
2005-05-09 01:42:07 +00:00
|
|
|
//TODO: Determine what the actual parameters to
|
2003-10-30 21:58:42 +00:00
|
|
|
// NtUserWindowFromPoint are.
|
|
|
|
return NtUserWindowFromPoint(Point.x, Point.y);
|
2001-06-12 17:51:51 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2002-09-17 23:46:23 +00:00
|
|
|
int STDCALL
|
|
|
|
MapWindowPoints(HWND hWndFrom, HWND hWndTo, LPPOINT lpPoints, UINT cPoints)
|
|
|
|
{
|
|
|
|
POINT FromOffset, ToOffset;
|
|
|
|
LONG XMove, YMove;
|
|
|
|
ULONG i;
|
|
|
|
|
2004-03-07 20:38:17 +00:00
|
|
|
if (hWndFrom == NULL)
|
|
|
|
{
|
|
|
|
FromOffset.x = FromOffset.y = 0;
|
|
|
|
} else
|
2004-02-26 22:52:05 +00:00
|
|
|
if(!NtUserGetClientOrigin(hWndFrom, &FromOffset))
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2004-03-07 20:38:17 +00:00
|
|
|
|
|
|
|
if (hWndTo == NULL)
|
|
|
|
{
|
|
|
|
ToOffset.x = ToOffset.y = 0;
|
|
|
|
} else
|
2004-02-26 22:52:05 +00:00
|
|
|
if(!NtUserGetClientOrigin(hWndTo, &ToOffset))
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2003-03-09 15:08:33 +00:00
|
|
|
XMove = FromOffset.x - ToOffset.x;
|
|
|
|
YMove = FromOffset.y - ToOffset.y;
|
2003-03-09 15:09:23 +00:00
|
|
|
|
2002-09-17 23:46:23 +00:00
|
|
|
for (i = 0; i < cPoints; i++)
|
|
|
|
{
|
|
|
|
lpPoints[i].x += XMove;
|
|
|
|
lpPoints[i].y += YMove;
|
|
|
|
}
|
2003-07-28 08:09:51 +00:00
|
|
|
return(MAKELONG(LOWORD(XMove), LOWORD(YMove)));
|
2002-09-17 23:46:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2005-05-09 01:42:07 +00:00
|
|
|
BOOL STDCALL
|
2002-09-17 23:46:23 +00:00
|
|
|
ScreenToClient(HWND hWnd, LPPOINT lpPoint)
|
|
|
|
{
|
2004-02-26 22:52:05 +00:00
|
|
|
return(MapWindowPoints(NULL, hWnd, lpPoint, 1) != 0);
|
2002-09-17 23:46:23 +00:00
|
|
|
}
|
|
|
|
|
2003-07-23 04:52:44 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2003-07-23 04:52:44 +00:00
|
|
|
ClientToScreen(HWND hWnd, LPPOINT lpPoint)
|
|
|
|
{
|
2004-02-26 22:52:05 +00:00
|
|
|
return (MapWindowPoints( hWnd, NULL, lpPoint, 1 ) != 0);
|
2003-07-23 04:52:44 +00:00
|
|
|
}
|
|
|
|
|
2003-07-28 08:09:51 +00:00
|
|
|
|
2003-08-18 00:11:17 +00:00
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL
|
2003-07-28 08:09:51 +00:00
|
|
|
STDCALL
|
|
|
|
SetWindowContextHelpId(HWND hwnd,
|
|
|
|
DWORD dwContextHelpId)
|
|
|
|
{
|
2004-01-26 08:44:51 +00:00
|
|
|
return NtUserSetWindowContextHelpId(hwnd, dwContextHelpId);
|
2003-07-28 08:09:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2003-08-18 00:11:17 +00:00
|
|
|
* @implemented
|
2003-07-28 08:09:51 +00:00
|
|
|
*/
|
|
|
|
DWORD
|
|
|
|
STDCALL
|
|
|
|
GetWindowContextHelpId(HWND hwnd)
|
|
|
|
{
|
2004-01-26 08:44:51 +00:00
|
|
|
return NtUserGetWindowContextHelpId(hwnd);
|
2003-07-28 08:09:51 +00:00
|
|
|
}
|
|
|
|
|
2003-08-12 22:27:55 +00:00
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2004-04-13 16:48:45 +00:00
|
|
|
int
|
2003-08-12 22:27:55 +00:00
|
|
|
STDCALL
|
|
|
|
InternalGetWindowText(HWND hWnd, LPWSTR lpString, int nMaxCount)
|
|
|
|
{
|
2003-11-09 11:42:08 +00:00
|
|
|
return NtUserInternalGetWindowText(hWnd, lpString, nMaxCount);
|
2003-08-12 22:27:55 +00:00
|
|
|
}
|
|
|
|
|
2003-08-14 20:25:52 +00:00
|
|
|
/*
|
2004-04-02 23:54:26 +00:00
|
|
|
* @implemented
|
2003-08-14 20:25:52 +00:00
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL
|
2003-08-19 01:31:15 +00:00
|
|
|
STDCALL
|
|
|
|
IsHungAppWindow(HWND hwnd)
|
2003-08-14 20:25:52 +00:00
|
|
|
{
|
2004-04-02 23:54:26 +00:00
|
|
|
return (NtUserQueryWindow(hwnd, QUERY_WINDOW_ISHUNG) != 0);
|
2003-08-14 20:25:52 +00:00
|
|
|
}
|
|
|
|
|
2003-08-19 01:31:15 +00:00
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
|
|
|
VOID
|
|
|
|
STDCALL
|
|
|
|
SetLastErrorEx(DWORD dwErrCode, DWORD dwType)
|
|
|
|
{
|
|
|
|
SetLastError(dwErrCode);
|
|
|
|
}
|
|
|
|
|
- Moved GetFocus, DrawCaptionTemp[AW], DrawMenuBarTemp, SetTaskmanWindow, SetProgmanWindow, GetProgmanWindow, GetTaskmanWindow, MenuWindowProc[AW], SetWindowsHook[AW], RegisterShellHookWindow, DeregisterShellHookWindow,
ChangeMenu[AW], UnhookWindowsHook, NotifyWinEvent, SetWinEventHook, UnhookWinEvent, IsWinEventHookInstalled, SetWindowStationUser, LockWindowStation, UnlockWindowStation, SetWindowStationUser, SetWindowsHookEx[AW] from stubs.c to appropriate files.
- Changed EditWndProc in user32.edf to point to EditWndProcA.
svn path=/trunk/; revision=6592
2003-11-09 13:50:04 +00:00
|
|
|
/*
|
2003-11-30 20:03:47 +00:00
|
|
|
* @implemented
|
- Moved GetFocus, DrawCaptionTemp[AW], DrawMenuBarTemp, SetTaskmanWindow, SetProgmanWindow, GetProgmanWindow, GetTaskmanWindow, MenuWindowProc[AW], SetWindowsHook[AW], RegisterShellHookWindow, DeregisterShellHookWindow,
ChangeMenu[AW], UnhookWindowsHook, NotifyWinEvent, SetWinEventHook, UnhookWinEvent, IsWinEventHookInstalled, SetWindowStationUser, LockWindowStation, UnlockWindowStation, SetWindowStationUser, SetWindowsHookEx[AW] from stubs.c to appropriate files.
- Changed EditWndProc in user32.edf to point to EditWndProcA.
svn path=/trunk/; revision=6592
2003-11-09 13:50:04 +00:00
|
|
|
*/
|
|
|
|
HWND
|
|
|
|
STDCALL
|
|
|
|
GetFocus(VOID)
|
|
|
|
{
|
2006-04-05 08:05:55 +00:00
|
|
|
return (HWND)NtUserGetThreadState(THREADSTATE_FOCUSWINDOW);
|
- Moved GetFocus, DrawCaptionTemp[AW], DrawMenuBarTemp, SetTaskmanWindow, SetProgmanWindow, GetProgmanWindow, GetTaskmanWindow, MenuWindowProc[AW], SetWindowsHook[AW], RegisterShellHookWindow, DeregisterShellHookWindow,
ChangeMenu[AW], UnhookWindowsHook, NotifyWinEvent, SetWinEventHook, UnhookWinEvent, IsWinEventHookInstalled, SetWindowStationUser, LockWindowStation, UnlockWindowStation, SetWindowStationUser, SetWindowsHookEx[AW] from stubs.c to appropriate files.
- Changed EditWndProc in user32.edf to point to EditWndProcA.
svn path=/trunk/; revision=6592
2003-11-09 13:50:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2005-07-31 06:22:05 +00:00
|
|
|
* @implemented
|
- Moved GetFocus, DrawCaptionTemp[AW], DrawMenuBarTemp, SetTaskmanWindow, SetProgmanWindow, GetProgmanWindow, GetTaskmanWindow, MenuWindowProc[AW], SetWindowsHook[AW], RegisterShellHookWindow, DeregisterShellHookWindow,
ChangeMenu[AW], UnhookWindowsHook, NotifyWinEvent, SetWinEventHook, UnhookWinEvent, IsWinEventHookInstalled, SetWindowStationUser, LockWindowStation, UnlockWindowStation, SetWindowStationUser, SetWindowsHookEx[AW] from stubs.c to appropriate files.
- Changed EditWndProc in user32.edf to point to EditWndProcA.
svn path=/trunk/; revision=6592
2003-11-09 13:50:04 +00:00
|
|
|
*/
|
|
|
|
HWND
|
|
|
|
STDCALL
|
2005-07-31 06:22:05 +00:00
|
|
|
SetTaskmanWindow(HWND hWnd)
|
- Moved GetFocus, DrawCaptionTemp[AW], DrawMenuBarTemp, SetTaskmanWindow, SetProgmanWindow, GetProgmanWindow, GetTaskmanWindow, MenuWindowProc[AW], SetWindowsHook[AW], RegisterShellHookWindow, DeregisterShellHookWindow,
ChangeMenu[AW], UnhookWindowsHook, NotifyWinEvent, SetWinEventHook, UnhookWinEvent, IsWinEventHookInstalled, SetWindowStationUser, LockWindowStation, UnlockWindowStation, SetWindowStationUser, SetWindowsHookEx[AW] from stubs.c to appropriate files.
- Changed EditWndProc in user32.edf to point to EditWndProcA.
svn path=/trunk/; revision=6592
2003-11-09 13:50:04 +00:00
|
|
|
{
|
2005-07-31 06:22:05 +00:00
|
|
|
return NtUserCallHwndOpt(hWnd, HWNDOPT_ROUTINE_SETTASKMANWINDOW);
|
- Moved GetFocus, DrawCaptionTemp[AW], DrawMenuBarTemp, SetTaskmanWindow, SetProgmanWindow, GetProgmanWindow, GetTaskmanWindow, MenuWindowProc[AW], SetWindowsHook[AW], RegisterShellHookWindow, DeregisterShellHookWindow,
ChangeMenu[AW], UnhookWindowsHook, NotifyWinEvent, SetWinEventHook, UnhookWinEvent, IsWinEventHookInstalled, SetWindowStationUser, LockWindowStation, UnlockWindowStation, SetWindowStationUser, SetWindowsHookEx[AW] from stubs.c to appropriate files.
- Changed EditWndProc in user32.edf to point to EditWndProcA.
svn path=/trunk/; revision=6592
2003-11-09 13:50:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2005-07-31 06:22:05 +00:00
|
|
|
* @implemented
|
- Moved GetFocus, DrawCaptionTemp[AW], DrawMenuBarTemp, SetTaskmanWindow, SetProgmanWindow, GetProgmanWindow, GetTaskmanWindow, MenuWindowProc[AW], SetWindowsHook[AW], RegisterShellHookWindow, DeregisterShellHookWindow,
ChangeMenu[AW], UnhookWindowsHook, NotifyWinEvent, SetWinEventHook, UnhookWinEvent, IsWinEventHookInstalled, SetWindowStationUser, LockWindowStation, UnlockWindowStation, SetWindowStationUser, SetWindowsHookEx[AW] from stubs.c to appropriate files.
- Changed EditWndProc in user32.edf to point to EditWndProcA.
svn path=/trunk/; revision=6592
2003-11-09 13:50:04 +00:00
|
|
|
*/
|
|
|
|
HWND
|
|
|
|
STDCALL
|
2005-07-31 06:22:05 +00:00
|
|
|
SetProgmanWindow(HWND hWnd)
|
- Moved GetFocus, DrawCaptionTemp[AW], DrawMenuBarTemp, SetTaskmanWindow, SetProgmanWindow, GetProgmanWindow, GetTaskmanWindow, MenuWindowProc[AW], SetWindowsHook[AW], RegisterShellHookWindow, DeregisterShellHookWindow,
ChangeMenu[AW], UnhookWindowsHook, NotifyWinEvent, SetWinEventHook, UnhookWinEvent, IsWinEventHookInstalled, SetWindowStationUser, LockWindowStation, UnlockWindowStation, SetWindowStationUser, SetWindowsHookEx[AW] from stubs.c to appropriate files.
- Changed EditWndProc in user32.edf to point to EditWndProcA.
svn path=/trunk/; revision=6592
2003-11-09 13:50:04 +00:00
|
|
|
{
|
2006-07-21 21:11:46 +00:00
|
|
|
return NtUserCallHwndOpt(hWnd, HWNDOPT_ROUTINE_SETPROGMANWINDOW);
|
- Moved GetFocus, DrawCaptionTemp[AW], DrawMenuBarTemp, SetTaskmanWindow, SetProgmanWindow, GetProgmanWindow, GetTaskmanWindow, MenuWindowProc[AW], SetWindowsHook[AW], RegisterShellHookWindow, DeregisterShellHookWindow,
ChangeMenu[AW], UnhookWindowsHook, NotifyWinEvent, SetWinEventHook, UnhookWinEvent, IsWinEventHookInstalled, SetWindowStationUser, LockWindowStation, UnlockWindowStation, SetWindowStationUser, SetWindowsHookEx[AW] from stubs.c to appropriate files.
- Changed EditWndProc in user32.edf to point to EditWndProcA.
svn path=/trunk/; revision=6592
2003-11-09 13:50:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2006-07-22 16:50:23 +00:00
|
|
|
* @implemented
|
- Moved GetFocus, DrawCaptionTemp[AW], DrawMenuBarTemp, SetTaskmanWindow, SetProgmanWindow, GetProgmanWindow, GetTaskmanWindow, MenuWindowProc[AW], SetWindowsHook[AW], RegisterShellHookWindow, DeregisterShellHookWindow,
ChangeMenu[AW], UnhookWindowsHook, NotifyWinEvent, SetWinEventHook, UnhookWinEvent, IsWinEventHookInstalled, SetWindowStationUser, LockWindowStation, UnlockWindowStation, SetWindowStationUser, SetWindowsHookEx[AW] from stubs.c to appropriate files.
- Changed EditWndProc in user32.edf to point to EditWndProcA.
svn path=/trunk/; revision=6592
2003-11-09 13:50:04 +00:00
|
|
|
*/
|
|
|
|
HWND
|
|
|
|
STDCALL
|
|
|
|
GetProgmanWindow(VOID)
|
|
|
|
{
|
2006-07-22 17:03:00 +00:00
|
|
|
return (HWND)NtUserGetThreadState(THREADSTATE_PROGMANWINDOW);
|
- Moved GetFocus, DrawCaptionTemp[AW], DrawMenuBarTemp, SetTaskmanWindow, SetProgmanWindow, GetProgmanWindow, GetTaskmanWindow, MenuWindowProc[AW], SetWindowsHook[AW], RegisterShellHookWindow, DeregisterShellHookWindow,
ChangeMenu[AW], UnhookWindowsHook, NotifyWinEvent, SetWinEventHook, UnhookWinEvent, IsWinEventHookInstalled, SetWindowStationUser, LockWindowStation, UnlockWindowStation, SetWindowStationUser, SetWindowsHookEx[AW] from stubs.c to appropriate files.
- Changed EditWndProc in user32.edf to point to EditWndProcA.
svn path=/trunk/; revision=6592
2003-11-09 13:50:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2006-07-22 16:50:23 +00:00
|
|
|
* @implemented
|
- Moved GetFocus, DrawCaptionTemp[AW], DrawMenuBarTemp, SetTaskmanWindow, SetProgmanWindow, GetProgmanWindow, GetTaskmanWindow, MenuWindowProc[AW], SetWindowsHook[AW], RegisterShellHookWindow, DeregisterShellHookWindow,
ChangeMenu[AW], UnhookWindowsHook, NotifyWinEvent, SetWinEventHook, UnhookWinEvent, IsWinEventHookInstalled, SetWindowStationUser, LockWindowStation, UnlockWindowStation, SetWindowStationUser, SetWindowsHookEx[AW] from stubs.c to appropriate files.
- Changed EditWndProc in user32.edf to point to EditWndProcA.
svn path=/trunk/; revision=6592
2003-11-09 13:50:04 +00:00
|
|
|
*/
|
|
|
|
HWND
|
|
|
|
STDCALL
|
|
|
|
GetTaskmanWindow(VOID)
|
|
|
|
{
|
2006-07-22 16:50:23 +00:00
|
|
|
return (HWND)NtUserGetThreadState(THREADSTATE_TASKMANWINDOW);
|
- Moved GetFocus, DrawCaptionTemp[AW], DrawMenuBarTemp, SetTaskmanWindow, SetProgmanWindow, GetProgmanWindow, GetTaskmanWindow, MenuWindowProc[AW], SetWindowsHook[AW], RegisterShellHookWindow, DeregisterShellHookWindow,
ChangeMenu[AW], UnhookWindowsHook, NotifyWinEvent, SetWinEventHook, UnhookWinEvent, IsWinEventHookInstalled, SetWindowStationUser, LockWindowStation, UnlockWindowStation, SetWindowStationUser, SetWindowsHookEx[AW] from stubs.c to appropriate files.
- Changed EditWndProc in user32.edf to point to EditWndProcA.
svn path=/trunk/; revision=6592
2003-11-09 13:50:04 +00:00
|
|
|
}
|
|
|
|
|
2003-12-08 18:21:25 +00:00
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2004-01-23 23:38:26 +00:00
|
|
|
BOOL STDCALL
|
2003-12-08 18:21:25 +00:00
|
|
|
ScrollWindow(HWND hWnd, int dx, int dy, CONST RECT *lpRect,
|
|
|
|
CONST RECT *prcClip)
|
|
|
|
{
|
2005-05-09 01:42:07 +00:00
|
|
|
return NtUserScrollWindowEx(hWnd, dx, dy, lpRect, prcClip, 0, NULL,
|
2003-12-08 18:21:25 +00:00
|
|
|
(lpRect ? 0 : SW_SCROLLCHILDREN) | SW_INVALIDATE) != ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
|
|
|
INT STDCALL
|
|
|
|
ScrollWindowEx(HWND hWnd, int dx, int dy, CONST RECT *prcScroll,
|
|
|
|
CONST RECT *prcClip, HRGN hrgnUpdate, LPRECT prcUpdate, UINT flags)
|
|
|
|
{
|
|
|
|
return NtUserScrollWindowEx(hWnd, dx, dy, prcScroll, prcClip, hrgnUpdate,
|
|
|
|
prcUpdate, flags);
|
|
|
|
}
|
|
|
|
|
2004-05-01 18:06:59 +00:00
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
|
|
|
BOOL
|
|
|
|
STDCALL
|
|
|
|
AnyPopup(VOID)
|
|
|
|
{
|
|
|
|
return NtUserAnyPopup();
|
|
|
|
}
|
|
|
|
|
2004-05-02 17:25:21 +00:00
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
|
|
|
BOOL
|
|
|
|
STDCALL
|
|
|
|
IsWindowInDestroy(HWND hWnd)
|
|
|
|
{
|
|
|
|
return NtUserIsWindowInDestroy(hWnd);
|
|
|
|
}
|
|
|
|
|
2004-05-21 10:09:31 +00:00
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
|
|
|
VOID
|
2005-05-09 01:42:07 +00:00
|
|
|
STDCALL
|
2004-05-21 10:09:31 +00:00
|
|
|
DisableProcessWindowsGhosting(VOID)
|
|
|
|
{
|
|
|
|
NtUserEnableProcessWindowGhosting(FALSE);
|
|
|
|
}
|
|
|
|
|
2001-06-12 17:51:51 +00:00
|
|
|
/* EOF */
|
2005-05-09 01:42:07 +00:00
|
|
|
|