mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
naming changes:
-remove annying "Object" from variables. prepend handles with "h" instead. -rename window->Self -> Window->hSelf svn path=/trunk/; revision=17695
This commit is contained in:
parent
4e5ef38048
commit
781981aa5f
13 changed files with 613 additions and 628 deletions
|
@ -53,7 +53,7 @@ typedef struct _WINDOW_OBJECT
|
|||
/* Position of the window's client area. */
|
||||
RECT ClientRect;
|
||||
/* Handle for the window. */
|
||||
HANDLE Self;
|
||||
HWND hSelf;
|
||||
/* Window flags. */
|
||||
ULONG Flags;
|
||||
/* Window menu handle or window id */
|
||||
|
|
|
@ -334,7 +334,7 @@ BOOL FASTCALL co_UserHideCaret(PWINDOW_OBJECT WindowObject)
|
|||
|
||||
ThreadQueue = (PUSER_MESSAGE_QUEUE)PsGetWin32Thread()->MessageQueue;
|
||||
|
||||
if(ThreadQueue->CaretInfo->hWnd != WindowObject->Self)
|
||||
if(ThreadQueue->CaretInfo->hWnd != WindowObject->hSelf)
|
||||
{
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
return FALSE;
|
||||
|
@ -342,7 +342,7 @@ BOOL FASTCALL co_UserHideCaret(PWINDOW_OBJECT WindowObject)
|
|||
|
||||
if(ThreadQueue->CaretInfo->Visible)
|
||||
{
|
||||
IntKillTimer(WindowObject->Self, IDCARETTIMER, TRUE);
|
||||
IntKillTimer(WindowObject->hSelf, IDCARETTIMER, TRUE);
|
||||
|
||||
co_IntHideCaret(ThreadQueue->CaretInfo);
|
||||
ThreadQueue->CaretInfo->Visible = 0;
|
||||
|
@ -384,11 +384,11 @@ CLEANUP:
|
|||
}
|
||||
|
||||
|
||||
BOOL FASTCALL co_UserShowCaret(PWINDOW_OBJECT WindowObject)
|
||||
BOOL FASTCALL co_UserShowCaret(PWINDOW_OBJECT Window)
|
||||
{
|
||||
PUSER_MESSAGE_QUEUE ThreadQueue;
|
||||
|
||||
if(WindowObject->OwnerThread != PsGetCurrentThread())
|
||||
if(Window->OwnerThread != PsGetCurrentThread())
|
||||
{
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
return FALSE;
|
||||
|
@ -396,7 +396,7 @@ BOOL FASTCALL co_UserShowCaret(PWINDOW_OBJECT WindowObject)
|
|||
|
||||
ThreadQueue = (PUSER_MESSAGE_QUEUE)PsGetWin32Thread()->MessageQueue;
|
||||
|
||||
if(ThreadQueue->CaretInfo->hWnd != WindowObject->Self)
|
||||
if(ThreadQueue->CaretInfo->hWnd != Window->hSelf)
|
||||
{
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
return FALSE;
|
||||
|
@ -409,7 +409,7 @@ BOOL FASTCALL co_UserShowCaret(PWINDOW_OBJECT WindowObject)
|
|||
{
|
||||
co_IntSendMessage(ThreadQueue->CaretInfo->hWnd, WM_SYSTIMER, IDCARETTIMER, 0);
|
||||
}
|
||||
IntSetTimer(WindowObject->Self, IDCARETTIMER, IntGetCaretBlinkTime(), NULL, TRUE);
|
||||
IntSetTimer(Window->hSelf, IDCARETTIMER, IntGetCaretBlinkTime(), NULL, TRUE);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
|
|
@ -471,19 +471,19 @@ CLEANUP:
|
|||
}
|
||||
|
||||
ULONG FASTCALL
|
||||
IntGetClassLong(struct _WINDOW_OBJECT *WindowObject, ULONG Offset, BOOL Ansi)
|
||||
IntGetClassLong(struct _WINDOW_OBJECT *Window, ULONG Offset, BOOL Ansi)
|
||||
{
|
||||
LONG Ret;
|
||||
|
||||
if ((int)Offset >= 0)
|
||||
{
|
||||
DPRINT("GetClassLong(%x, %d)\n", WindowObject->Self, Offset);
|
||||
if ((Offset + sizeof(LONG)) > WindowObject->Class->cbClsExtra)
|
||||
DPRINT("GetClassLong(%x, %d)\n", Window->hSelf, Offset);
|
||||
if ((Offset + sizeof(LONG)) > Window->Class->cbClsExtra)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
Ret = *((LONG *)(WindowObject->Class->ExtraData + Offset));
|
||||
Ret = *((LONG *)(Window->Class->ExtraData + Offset));
|
||||
DPRINT("Result: %x\n", Ret);
|
||||
return Ret;
|
||||
}
|
||||
|
@ -491,40 +491,40 @@ IntGetClassLong(struct _WINDOW_OBJECT *WindowObject, ULONG Offset, BOOL Ansi)
|
|||
switch (Offset)
|
||||
{
|
||||
case GCL_CBWNDEXTRA:
|
||||
Ret = WindowObject->Class->cbWndExtra;
|
||||
Ret = Window->Class->cbWndExtra;
|
||||
break;
|
||||
case GCL_CBCLSEXTRA:
|
||||
Ret = WindowObject->Class->cbClsExtra;
|
||||
Ret = Window->Class->cbClsExtra;
|
||||
break;
|
||||
case GCL_HBRBACKGROUND:
|
||||
Ret = (ULONG)WindowObject->Class->hbrBackground;
|
||||
Ret = (ULONG)Window->Class->hbrBackground;
|
||||
break;
|
||||
case GCL_HCURSOR:
|
||||
Ret = (ULONG)WindowObject->Class->hCursor;
|
||||
Ret = (ULONG)Window->Class->hCursor;
|
||||
break;
|
||||
case GCL_HICON:
|
||||
Ret = (ULONG)WindowObject->Class->hIcon;
|
||||
Ret = (ULONG)Window->Class->hIcon;
|
||||
break;
|
||||
case GCL_HICONSM:
|
||||
Ret = (ULONG)WindowObject->Class->hIconSm;
|
||||
Ret = (ULONG)Window->Class->hIconSm;
|
||||
break;
|
||||
case GCL_HMODULE:
|
||||
Ret = (ULONG)WindowObject->Class->hInstance;
|
||||
Ret = (ULONG)Window->Class->hInstance;
|
||||
break;
|
||||
case GCL_MENUNAME:
|
||||
Ret = (ULONG)WindowObject->Class->lpszMenuName.Buffer;
|
||||
Ret = (ULONG)Window->Class->lpszMenuName.Buffer;
|
||||
break;
|
||||
case GCL_STYLE:
|
||||
Ret = WindowObject->Class->style;
|
||||
Ret = Window->Class->style;
|
||||
break;
|
||||
case GCL_WNDPROC:
|
||||
if (Ansi)
|
||||
{
|
||||
Ret = (ULONG)WindowObject->Class->lpfnWndProcA;
|
||||
Ret = (ULONG)Window->Class->lpfnWndProcA;
|
||||
}
|
||||
else
|
||||
{
|
||||
Ret = (ULONG)WindowObject->Class->lpfnWndProcW;
|
||||
Ret = (ULONG)Window->Class->lpfnWndProcW;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -537,21 +537,21 @@ IntGetClassLong(struct _WINDOW_OBJECT *WindowObject, ULONG Offset, BOOL Ansi)
|
|||
DWORD STDCALL
|
||||
NtUserGetClassLong(HWND hWnd, DWORD Offset, BOOL Ansi)
|
||||
{
|
||||
PWINDOW_OBJECT WindowObject;
|
||||
PWINDOW_OBJECT Window;
|
||||
LONG Ret;
|
||||
DECLARE_RETURN(DWORD);
|
||||
|
||||
DPRINT("Enter NtUserGetClassLong\n");
|
||||
UserEnterExclusive();
|
||||
|
||||
WindowObject = IntGetWindowObject(hWnd);
|
||||
if (WindowObject == NULL)
|
||||
Window = IntGetWindowObject(hWnd);
|
||||
if (Window == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
|
||||
RETURN(0);
|
||||
}
|
||||
Ret = IntGetClassLong(WindowObject, Offset, Ansi);
|
||||
IntReleaseWindowObject(WindowObject);
|
||||
Ret = IntGetClassLong(Window, Offset, Ansi);
|
||||
IntReleaseWindowObject(Window);
|
||||
RETURN(Ret);
|
||||
|
||||
CLEANUP:
|
||||
|
@ -561,44 +561,44 @@ CLEANUP:
|
|||
}
|
||||
|
||||
void FASTCALL
|
||||
co_IntSetClassLong(PWINDOW_OBJECT WindowObject, ULONG Offset, LONG dwNewLong, BOOL Ansi)
|
||||
co_IntSetClassLong(PWINDOW_OBJECT Window, ULONG Offset, LONG dwNewLong, BOOL Ansi)
|
||||
{
|
||||
PWINDOW_OBJECT Parent, Owner;
|
||||
|
||||
if ((int)Offset >= 0)
|
||||
{
|
||||
DPRINT("SetClassLong(%x, %d, %x)\n", WindowObject->Self, Offset, dwNewLong);
|
||||
if ((Offset + sizeof(LONG)) > WindowObject->Class->cbClsExtra)
|
||||
DPRINT("SetClassLong(%x, %d, %x)\n", Window->hSelf, Offset, dwNewLong);
|
||||
if ((Offset + sizeof(LONG)) > Window->Class->cbClsExtra)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
return;
|
||||
}
|
||||
*((LONG *)(WindowObject->Class->ExtraData + Offset)) = dwNewLong;
|
||||
*((LONG *)(Window->Class->ExtraData + Offset)) = dwNewLong;
|
||||
return;
|
||||
}
|
||||
|
||||
switch (Offset)
|
||||
{
|
||||
case GCL_CBWNDEXTRA:
|
||||
WindowObject->Class->cbWndExtra = dwNewLong;
|
||||
Window->Class->cbWndExtra = dwNewLong;
|
||||
break;
|
||||
case GCL_CBCLSEXTRA:
|
||||
WindowObject->Class->cbClsExtra = dwNewLong;
|
||||
Window->Class->cbClsExtra = dwNewLong;
|
||||
break;
|
||||
case GCL_HBRBACKGROUND:
|
||||
WindowObject->Class->hbrBackground = (HBRUSH)dwNewLong;
|
||||
Window->Class->hbrBackground = (HBRUSH)dwNewLong;
|
||||
break;
|
||||
case GCL_HCURSOR:
|
||||
WindowObject->Class->hCursor = (HCURSOR)dwNewLong;
|
||||
Window->Class->hCursor = (HCURSOR)dwNewLong;
|
||||
break;
|
||||
case GCL_HICON:
|
||||
WindowObject->Class->hIcon = (HICON)dwNewLong;
|
||||
Owner = IntGetOwner(WindowObject);
|
||||
Parent = IntGetParent(WindowObject);
|
||||
Window->Class->hIcon = (HICON)dwNewLong;
|
||||
Owner = IntGetOwner(Window);
|
||||
Parent = IntGetParent(Window);
|
||||
|
||||
if ((!Owner) && (!Parent))
|
||||
{
|
||||
co_IntShellHookNotify(HSHELL_REDRAW, (LPARAM) WindowObject->Self);
|
||||
co_IntShellHookNotify(HSHELL_REDRAW, (LPARAM) Window->hSelf);
|
||||
}
|
||||
|
||||
if (Parent)
|
||||
|
@ -614,43 +614,43 @@ co_IntSetClassLong(PWINDOW_OBJECT WindowObject, ULONG Offset, LONG dwNewLong, BO
|
|||
|
||||
break;
|
||||
case GCL_HICONSM:
|
||||
WindowObject->Class->hIconSm = (HICON)dwNewLong;
|
||||
Window->Class->hIconSm = (HICON)dwNewLong;
|
||||
break;
|
||||
case GCL_HMODULE:
|
||||
WindowObject->Class->hInstance = (HINSTANCE)dwNewLong;
|
||||
Window->Class->hInstance = (HINSTANCE)dwNewLong;
|
||||
break;
|
||||
case GCL_MENUNAME:
|
||||
if (WindowObject->Class->lpszMenuName.MaximumLength)
|
||||
RtlFreeUnicodeString(&WindowObject->Class->lpszMenuName);
|
||||
if (Window->Class->lpszMenuName.MaximumLength)
|
||||
RtlFreeUnicodeString(&Window->Class->lpszMenuName);
|
||||
if (!IS_INTRESOURCE(dwNewLong))
|
||||
{
|
||||
WindowObject->Class->lpszMenuName.Length =
|
||||
WindowObject->Class->lpszMenuName.MaximumLength = ((PUNICODE_STRING)dwNewLong)->MaximumLength;
|
||||
WindowObject->Class->lpszMenuName.Buffer = ExAllocatePoolWithTag(PagedPool, WindowObject->Class->lpszMenuName.MaximumLength, TAG_STRING);
|
||||
RtlCopyUnicodeString(&WindowObject->Class->lpszMenuName, (PUNICODE_STRING)dwNewLong);
|
||||
Window->Class->lpszMenuName.Length =
|
||||
Window->Class->lpszMenuName.MaximumLength = ((PUNICODE_STRING)dwNewLong)->MaximumLength;
|
||||
Window->Class->lpszMenuName.Buffer = ExAllocatePoolWithTag(PagedPool, Window->Class->lpszMenuName.MaximumLength, TAG_STRING);
|
||||
RtlCopyUnicodeString(&Window->Class->lpszMenuName, (PUNICODE_STRING)dwNewLong);
|
||||
}
|
||||
else
|
||||
{
|
||||
WindowObject->Class->lpszMenuName.Length =
|
||||
WindowObject->Class->lpszMenuName.MaximumLength = 0;
|
||||
WindowObject->Class->lpszMenuName.Buffer = (LPWSTR)dwNewLong;
|
||||
Window->Class->lpszMenuName.Length =
|
||||
Window->Class->lpszMenuName.MaximumLength = 0;
|
||||
Window->Class->lpszMenuName.Buffer = (LPWSTR)dwNewLong;
|
||||
}
|
||||
break;
|
||||
case GCL_STYLE:
|
||||
WindowObject->Class->style = dwNewLong;
|
||||
Window->Class->style = dwNewLong;
|
||||
break;
|
||||
case GCL_WNDPROC:
|
||||
if (Ansi)
|
||||
{
|
||||
WindowObject->Class->lpfnWndProcA = (WNDPROC)dwNewLong;
|
||||
WindowObject->Class->lpfnWndProcW = (WNDPROC) IntAddWndProcHandle((WNDPROC)dwNewLong,FALSE);
|
||||
WindowObject->Class->Unicode = FALSE;
|
||||
Window->Class->lpfnWndProcA = (WNDPROC)dwNewLong;
|
||||
Window->Class->lpfnWndProcW = (WNDPROC) IntAddWndProcHandle((WNDPROC)dwNewLong,FALSE);
|
||||
Window->Class->Unicode = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
WindowObject->Class->lpfnWndProcW = (WNDPROC)dwNewLong;
|
||||
WindowObject->Class->lpfnWndProcA = (WNDPROC) IntAddWndProcHandle((WNDPROC)dwNewLong,TRUE);
|
||||
WindowObject->Class->Unicode = TRUE;
|
||||
Window->Class->lpfnWndProcW = (WNDPROC)dwNewLong;
|
||||
Window->Class->lpfnWndProcA = (WNDPROC) IntAddWndProcHandle((WNDPROC)dwNewLong,TRUE);
|
||||
Window->Class->Unicode = TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -662,22 +662,21 @@ NtUserSetClassLong(HWND hWnd,
|
|||
LONG dwNewLong,
|
||||
BOOL Ansi)
|
||||
{
|
||||
PWINDOW_OBJECT WindowObject;
|
||||
PWINDOW_OBJECT Window;
|
||||
LONG Ret;
|
||||
DECLARE_RETURN(DWORD);
|
||||
|
||||
DPRINT("Enter NtUserSetClassLong\n");
|
||||
UserEnterExclusive();
|
||||
|
||||
WindowObject = IntGetWindowObject(hWnd);
|
||||
if (WindowObject == NULL)
|
||||
if (!(Window = IntGetWindowObject(hWnd)))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
|
||||
RETURN(0);
|
||||
}
|
||||
Ret = IntGetClassLong(WindowObject, Offset, Ansi);
|
||||
co_IntSetClassLong(WindowObject, Offset, dwNewLong, Ansi);
|
||||
IntReleaseWindowObject(WindowObject);
|
||||
Ret = IntGetClassLong(Window, Offset, Ansi);
|
||||
co_IntSetClassLong(Window, Offset, dwNewLong, Ansi);
|
||||
IntReleaseWindowObject(Window);
|
||||
RETURN(Ret);
|
||||
|
||||
CLEANUP:
|
||||
|
@ -702,7 +701,7 @@ NtUserUnregisterClass(
|
|||
DWORD Unknown)
|
||||
{
|
||||
PWNDCLASS_OBJECT Class;
|
||||
PWINSTATION_OBJECT WinStaObject;
|
||||
PWINSTATION_OBJECT WinSta;
|
||||
DECLARE_RETURN(BOOL);
|
||||
|
||||
DPRINT("Enter NtUserUnregisterClass(%S)\n", ClassNameOrAtom);
|
||||
|
@ -714,7 +713,7 @@ NtUserUnregisterClass(
|
|||
RETURN( FALSE);
|
||||
}
|
||||
|
||||
WinStaObject = PsGetWin32Thread()->Desktop->WindowStation;
|
||||
WinSta = PsGetWin32Thread()->Desktop->WindowStation;
|
||||
|
||||
if (!ClassReferenceClassByNameOrAtom(&Class, ClassNameOrAtom, hInstance))
|
||||
{
|
||||
|
@ -742,7 +741,7 @@ NtUserUnregisterClass(
|
|||
|
||||
RemoveEntryList(&Class->ListEntry);
|
||||
|
||||
RtlDeleteAtomFromAtomTable(WinStaObject->AtomTable, Class->Atom);
|
||||
RtlDeleteAtomFromAtomTable(WinSta->AtomTable, Class->Atom);
|
||||
|
||||
/* Free the object */
|
||||
ClassDereferenceObject(Class);
|
||||
|
|
|
@ -135,7 +135,7 @@ IntFindChildWindowToOwner(PWINDOW_OBJECT Root, PWINDOW_OBJECT Owner)
|
|||
|
||||
if(OwnerWnd == Owner)
|
||||
{
|
||||
Ret = Child->Self;
|
||||
Ret = Child->hSelf;
|
||||
IntReleaseWindowObject(OwnerWnd);
|
||||
return Ret;
|
||||
}
|
||||
|
@ -148,9 +148,9 @@ IntFindChildWindowToOwner(PWINDOW_OBJECT Root, PWINDOW_OBJECT Owner)
|
|||
STATIC BOOL FASTCALL
|
||||
co_IntSetForegroundAndFocusWindow(PWINDOW_OBJECT Window, PWINDOW_OBJECT FocusWindow, BOOL MouseActivate)
|
||||
{
|
||||
HWND hWnd = Window->Self;
|
||||
HWND hWnd = Window->hSelf;
|
||||
HWND hWndPrev = NULL;
|
||||
HWND hWndFocus = FocusWindow->Self;
|
||||
HWND hWndFocus = FocusWindow->hSelf;
|
||||
HWND hWndFocusPrev = NULL;
|
||||
PUSER_MESSAGE_QUEUE PrevForegroundQueue;
|
||||
|
||||
|
@ -243,8 +243,8 @@ co_IntMouseActivateWindow(PWINDOW_OBJECT Window)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
Top = UserGetAncestor(Window->Self, GA_ROOT);
|
||||
if (Top != Window->Self)
|
||||
Top = UserGetAncestor(Window->hSelf, GA_ROOT);
|
||||
if (Top != Window->hSelf)
|
||||
{
|
||||
TopWindow = IntGetWindowObject(Top);
|
||||
if (TopWindow == NULL)
|
||||
|
@ -261,7 +261,7 @@ co_IntMouseActivateWindow(PWINDOW_OBJECT Window)
|
|||
/* TMN: Check return valud from this function? */
|
||||
co_IntSetForegroundAndFocusWindow(TopWindow, Window, TRUE);
|
||||
|
||||
if (Top != Window->Self)
|
||||
if (Top != Window->hSelf)
|
||||
{
|
||||
IntReleaseWindowObject(TopWindow);
|
||||
}
|
||||
|
@ -285,7 +285,7 @@ co_IntSetActiveWindow(PWINDOW_OBJECT Window)
|
|||
{
|
||||
return ThreadQueue ? 0 : ThreadQueue->ActiveWindow;
|
||||
}
|
||||
hWnd = Window->Self;
|
||||
hWnd = Window->hSelf;
|
||||
}
|
||||
|
||||
hWndPrev = ThreadQueue->ActiveWindow;
|
||||
|
|
|
@ -128,7 +128,7 @@ UnregisterWindowHotKeys(PWINDOW_OBJECT Window)
|
|||
HOT_KEY_ITEM,
|
||||
ListEntry);
|
||||
Entry = Entry->Flink;
|
||||
if (HotKeyItem->hWnd == Window->Self)
|
||||
if (HotKeyItem->hWnd == Window->hSelf)
|
||||
{
|
||||
RemoveEntryList (&HotKeyItem->ListEntry);
|
||||
ExFreePool (HotKeyItem);
|
||||
|
|
|
@ -1161,52 +1161,52 @@ IntGetMenuDefaultItem(PMENU_OBJECT MenuObject, UINT fByPos, UINT gmdiFlags,
|
|||
}
|
||||
|
||||
VOID FASTCALL
|
||||
co_IntInitTracking(PWINDOW_OBJECT WindowObject, PMENU_OBJECT MenuObject, BOOL Popup,
|
||||
co_IntInitTracking(PWINDOW_OBJECT Window, PMENU_OBJECT Menu, BOOL Popup,
|
||||
UINT Flags)
|
||||
{
|
||||
/* FIXME - hide caret */
|
||||
|
||||
if(!(Flags & TPM_NONOTIFY))
|
||||
co_IntSendMessage(WindowObject->Self, WM_SETCURSOR, (WPARAM)WindowObject->Self, HTCAPTION);
|
||||
co_IntSendMessage(Window->hSelf, WM_SETCURSOR, (WPARAM)Window->hSelf, HTCAPTION);
|
||||
|
||||
/* FIXME - send WM_SETCURSOR message */
|
||||
|
||||
if(!(Flags & TPM_NONOTIFY))
|
||||
co_IntSendMessage(WindowObject->Self, WM_INITMENU, (WPARAM)MenuObject->MenuInfo.Self, 0);
|
||||
co_IntSendMessage(Window->hSelf, WM_INITMENU, (WPARAM)Menu->MenuInfo.Self, 0);
|
||||
}
|
||||
|
||||
VOID FASTCALL
|
||||
co_IntExitTracking(PWINDOW_OBJECT WindowObject, PMENU_OBJECT MenuObject, BOOL Popup,
|
||||
co_IntExitTracking(PWINDOW_OBJECT Window, PMENU_OBJECT Menu, BOOL Popup,
|
||||
UINT Flags)
|
||||
{
|
||||
if(!(Flags & TPM_NONOTIFY))
|
||||
co_IntSendMessage(WindowObject->Self, WM_EXITMENULOOP, 0 /* FIXME */, 0);
|
||||
co_IntSendMessage(Window->hSelf, WM_EXITMENULOOP, 0 /* FIXME */, 0);
|
||||
|
||||
/* FIXME - Show caret again */
|
||||
}
|
||||
|
||||
INT FASTCALL
|
||||
IntTrackMenu(PMENU_OBJECT MenuObject, PWINDOW_OBJECT WindowObject, INT x, INT y,
|
||||
IntTrackMenu(PMENU_OBJECT Menu, PWINDOW_OBJECT Window, INT x, INT y,
|
||||
RECT lprect)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL FASTCALL
|
||||
co_IntTrackPopupMenu(PMENU_OBJECT MenuObject, PWINDOW_OBJECT WindowObject,
|
||||
co_IntTrackPopupMenu(PMENU_OBJECT Menu, PWINDOW_OBJECT Window,
|
||||
UINT Flags, POINT *Pos, UINT MenuPos, RECT *ExcludeRect)
|
||||
{
|
||||
co_IntInitTracking(WindowObject, MenuObject, TRUE, Flags);
|
||||
co_IntInitTracking(Window, Menu, TRUE, Flags);
|
||||
|
||||
co_IntExitTracking(WindowObject, MenuObject, TRUE, Flags);
|
||||
co_IntExitTracking(Window, Menu, TRUE, Flags);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL FASTCALL
|
||||
IntSetMenuItemRect(PMENU_OBJECT MenuObject, UINT Item, BOOL fByPos, RECT *rcRect)
|
||||
IntSetMenuItemRect(PMENU_OBJECT Menu, UINT Item, BOOL fByPos, RECT *rcRect)
|
||||
{
|
||||
PMENU_ITEM mi;
|
||||
if(IntGetMenuItemByFlag(MenuObject, Item, (fByPos ? MF_BYPOSITION : MF_BYCOMMAND),
|
||||
if(IntGetMenuItemByFlag(Menu, Item, (fByPos ? MF_BYPOSITION : MF_BYCOMMAND),
|
||||
&mi, NULL) > -1)
|
||||
{
|
||||
mi->Rect = *rcRect;
|
||||
|
|
|
@ -513,7 +513,7 @@ co_IntActivateWindowMouse(PUSER_MESSAGE_QUEUE ThreadQueue, LPMSG Msg, PWINDOW_OB
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
Result = co_IntSendMessage(MsgWindow->Self, WM_MOUSEACTIVATE, (WPARAM)IntGetParent(MsgWindow), (LPARAM)MAKELONG(*HitTest, Msg->message));
|
||||
Result = co_IntSendMessage(MsgWindow->hSelf, WM_MOUSEACTIVATE, (WPARAM)IntGetParent(MsgWindow), (LPARAM)MAKELONG(*HitTest, Msg->message));
|
||||
switch (Result)
|
||||
{
|
||||
case MA_NOACTIVATEANDEAT:
|
||||
|
@ -544,10 +544,10 @@ co_IntTranslateMouseMessage(PUSER_MESSAGE_QUEUE ThreadQueue, LPMSG Msg, USHORT *
|
|||
}
|
||||
|
||||
if(ThreadQueue == Window->MessageQueue &&
|
||||
ThreadQueue->CaptureWindow != Window->Self)
|
||||
ThreadQueue->CaptureWindow != Window->hSelf)
|
||||
{
|
||||
/* only send WM_NCHITTEST messages if we're not capturing the window! */
|
||||
*HitTest = co_IntSendMessage(Window->Self, WM_NCHITTEST, 0,
|
||||
*HitTest = co_IntSendMessage(Window->hSelf, WM_NCHITTEST, 0,
|
||||
MAKELONG(Msg->pt.x, Msg->pt.y));
|
||||
|
||||
if(*HitTest == (USHORT)HTTRANSPARENT)
|
||||
|
@ -565,7 +565,7 @@ co_IntTranslateMouseMessage(PUSER_MESSAGE_QUEUE ThreadQueue, LPMSG Msg, USHORT *
|
|||
if(Wnd != Window)
|
||||
{
|
||||
/* post the message to the other window */
|
||||
Msg->hwnd = Wnd->Self;
|
||||
Msg->hwnd = Wnd->hSelf;
|
||||
if(!(Wnd->Status & WINDOWSTATUS_DESTROYING))
|
||||
{
|
||||
MsqPostMessage(Wnd->MessageQueue, Msg, FALSE,
|
||||
|
@ -612,7 +612,7 @@ co_IntTranslateMouseMessage(PUSER_MESSAGE_QUEUE ThreadQueue, LPMSG Msg, USHORT *
|
|||
(((*HitTest) == HTCAPTION) || ((*HitTest) == HTSYSMENU)))
|
||||
{
|
||||
Msg->message = WM_CONTEXTMENU;
|
||||
Msg->wParam = (WPARAM)Window->Self;
|
||||
Msg->wParam = (WPARAM)Window->hSelf;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -354,7 +354,7 @@ co_MsqTranslateMouseMessage(PUSER_MESSAGE_QUEUE MessageQueue, HWND hWnd, UINT Fi
|
|||
|
||||
*ScreenPoint = Message->Msg.pt;
|
||||
|
||||
if((hWnd != NULL && Window->Self != hWnd) ||
|
||||
if((hWnd != NULL && Window->hSelf != hWnd) ||
|
||||
((FilterLow != 0 || FilterLow != 0) && (Msg < FilterLow || Msg > FilterHigh)))
|
||||
{
|
||||
/* Reject the message because it doesn't match the filter */
|
||||
|
@ -395,7 +395,7 @@ co_MsqTranslateMouseMessage(PUSER_MESSAGE_QUEUE MessageQueue, HWND hWnd, UINT Fi
|
|||
}
|
||||
|
||||
/* FIXME - only assign if removing? */
|
||||
Message->Msg.hwnd = Window->Self;
|
||||
Message->Msg.hwnd = Window->hSelf;
|
||||
Message->Msg.message = Msg;
|
||||
Message->Msg.lParam = MAKELONG(Message->Msg.pt.x, Message->Msg.pt.y);
|
||||
|
||||
|
@ -924,7 +924,7 @@ MsqRemoveWindowMessagesFromQueue(PVOID pWindow)
|
|||
{
|
||||
PostedMessage = CONTAINING_RECORD(CurrentEntry, USER_MESSAGE,
|
||||
ListEntry);
|
||||
if (PostedMessage->Msg.hwnd == Window->Self)
|
||||
if (PostedMessage->Msg.hwnd == Window->hSelf)
|
||||
{
|
||||
RemoveEntryList(&PostedMessage->ListEntry);
|
||||
MsqDestroyMessage(PostedMessage);
|
||||
|
@ -944,7 +944,7 @@ MsqRemoveWindowMessagesFromQueue(PVOID pWindow)
|
|||
CurrentEntry = RemoveHeadList(&MessageQueue->SentMessagesListHead);
|
||||
SentMessage = CONTAINING_RECORD(CurrentEntry, USER_SENT_MESSAGE,
|
||||
ListEntry);
|
||||
if(SentMessage->Msg.hwnd == Window->Self)
|
||||
if(SentMessage->Msg.hwnd == Window->hSelf)
|
||||
{
|
||||
DPRINT("Notify the sender and remove a message from the queue that had not been dispatched\n");
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ STATIC VOID FASTCALL
|
|||
co_IntPaintWindows(PWINDOW_OBJECT Window, ULONG Flags)
|
||||
{
|
||||
HDC hDC;
|
||||
HWND hWnd = Window->Self;
|
||||
HWND hWnd = Window->hSelf;
|
||||
HRGN TempRegion;
|
||||
|
||||
if (Flags & (RDW_ERASENOW | RDW_UPDATENOW))
|
||||
|
@ -555,7 +555,7 @@ IntFindWindowToRepaint(HWND hWnd, PW32THREAD Thread)
|
|||
if (IntIsWindowDirty(Child) &&
|
||||
IntWndBelongsToThread(Child, Thread))
|
||||
{
|
||||
hFoundWnd = Child->Self;
|
||||
hFoundWnd = Child->hSelf;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -365,7 +365,7 @@ co_IntSetScrollInfo(PWINDOW_OBJECT Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bR
|
|||
}
|
||||
else if ((nBar != SB_CTL) && bChangeParams)
|
||||
{
|
||||
co_UserShowScrollBar(Window->Self, nBar, FALSE);
|
||||
co_UserShowScrollBar(Window->hSelf, nBar, FALSE);
|
||||
return Info->nPos;
|
||||
}
|
||||
}
|
||||
|
@ -374,7 +374,7 @@ co_IntSetScrollInfo(PWINDOW_OBJECT Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bR
|
|||
/* new_flags = 0;*/
|
||||
if ((nBar != SB_CTL) && bChangeParams)
|
||||
{
|
||||
co_UserShowScrollBar(Window->Self, nBar, TRUE);
|
||||
co_UserShowScrollBar(Window->hSelf, nBar, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -452,13 +452,13 @@ co_IntCreateScrollBars(PWINDOW_OBJECT Window)
|
|||
Size = 3 * (sizeof(WINDOW_SCROLLINFO));
|
||||
if(!(Window->Scroll = ExAllocatePoolWithTag(PagedPool, Size, TAG_SBARINFO)))
|
||||
{
|
||||
DPRINT1("Unable to allocate memory for scrollbar information for window 0x%x\n", Window->Self);
|
||||
DPRINT1("Unable to allocate memory for scrollbar information for window 0x%x\n", Window->hSelf);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
RtlZeroMemory(Window->Scroll, Size);
|
||||
|
||||
Result = co_WinPosGetNonClientSize(Window->Self,
|
||||
Result = co_WinPosGetNonClientSize(Window->hSelf,
|
||||
&Window->WindowRect,
|
||||
&Window->ClientRect);
|
||||
|
||||
|
|
|
@ -294,7 +294,7 @@ DceUpdateVisRgn(DCE *Dce, PWINDOW_OBJECT Window, ULONG Flags)
|
|||
{
|
||||
DcxFlags = Flags & ~(DCX_CLIPSIBLINGS | DCX_CLIPCHILDREN | DCX_WINDOW);
|
||||
}
|
||||
hRgnVisible = DceGetVisRgn(Parent->Self, DcxFlags, Window->Self, Flags);
|
||||
hRgnVisible = DceGetVisRgn(Parent->hSelf, DcxFlags, Window->hSelf, Flags);
|
||||
if (hRgnVisible == NULL)
|
||||
{
|
||||
hRgnVisible = NtGdiCreateRectRgn(0, 0, 0, 0);
|
||||
|
@ -332,7 +332,7 @@ DceUpdateVisRgn(DCE *Dce, PWINDOW_OBJECT Window, ULONG Flags)
|
|||
}
|
||||
else
|
||||
{
|
||||
hRgnVisible = DceGetVisRgn(Window->Self, Flags, 0, 0);
|
||||
hRgnVisible = DceGetVisRgn(Window->hSelf, Flags, 0, 0);
|
||||
}
|
||||
|
||||
noparent:
|
||||
|
@ -471,7 +471,7 @@ UserGetDCEx(PWINDOW_OBJECT Window OPTIONAL, HANDLE ClipRegion, ULONG Flags)
|
|||
{
|
||||
DceEmpty = Dce;
|
||||
}
|
||||
else if (Dce->hwndCurrent == (Window ? Window->Self : NULL) &&
|
||||
else if (Dce->hwndCurrent == (Window ? Window->hSelf : NULL) &&
|
||||
((Dce->DCXFlags & DCX_CACHECOMPAREMASK) == DcxFlags))
|
||||
{
|
||||
#if 0 /* FIXME */
|
||||
|
@ -498,7 +498,7 @@ UserGetDCEx(PWINDOW_OBJECT Window OPTIONAL, HANDLE ClipRegion, ULONG Flags)
|
|||
else
|
||||
{
|
||||
Dce = Window->Dce;
|
||||
if (NULL != Dce && Dce->hwndCurrent == (Window ? Window->Self : NULL))
|
||||
if (NULL != Dce && Dce->hwndCurrent == (Window ? Window->hSelf : NULL))
|
||||
{
|
||||
UpdateVisRgn = FALSE; /* updated automatically, via DCHook() */
|
||||
}
|
||||
|
@ -512,7 +512,7 @@ UserGetDCEx(PWINDOW_OBJECT Window OPTIONAL, HANDLE ClipRegion, ULONG Flags)
|
|||
return(NULL);
|
||||
}
|
||||
|
||||
Dce->hwndCurrent = (Window ? Window->Self : NULL);
|
||||
Dce->hwndCurrent = (Window ? Window->hSelf : NULL);
|
||||
Dce->DCXFlags = DcxFlags | (Flags & DCX_WINDOWPAINT) | DCX_DCEBUSY;
|
||||
|
||||
if (0 == (Flags & (DCX_EXCLUDERGN | DCX_INTERSECTRGN)) && NULL != ClipRegion)
|
||||
|
@ -781,7 +781,7 @@ DceFreeWindowDCE(PWINDOW_OBJECT Window)
|
|||
pDCE = FirstDce;
|
||||
while (pDCE)
|
||||
{
|
||||
if (pDCE->hwndCurrent == Window->Self)
|
||||
if (pDCE->hwndCurrent == Window->hSelf)
|
||||
{
|
||||
if (pDCE == Window->Dce) /* owned or Class DCE*/
|
||||
{
|
||||
|
@ -808,7 +808,7 @@ DceFreeWindowDCE(PWINDOW_OBJECT Window)
|
|||
* We should change this to DPRINT when ReactOS is more stable
|
||||
* (for 1.0?).
|
||||
*/
|
||||
DPRINT1("[%p] GetDC() without ReleaseDC()!\n", Window->Self);
|
||||
DPRINT1("[%p] GetDC() without ReleaseDC()!\n", Window->hSelf);
|
||||
DceReleaseDC(pDCE);
|
||||
}
|
||||
|
||||
|
@ -854,7 +854,7 @@ DceResetActiveDCEs(PWINDOW_OBJECT Window)
|
|||
{
|
||||
if (0 == (pDCE->DCXFlags & DCX_DCEEMPTY))
|
||||
{
|
||||
if (Window->Self == pDCE->hwndCurrent)
|
||||
if (Window->hSelf == pDCE->hwndCurrent)
|
||||
{
|
||||
CurrentWindow = Window;
|
||||
}
|
||||
|
@ -871,14 +871,14 @@ DceResetActiveDCEs(PWINDOW_OBJECT Window)
|
|||
dc = DC_LockDc(pDCE->hDC);
|
||||
if (dc == NULL)
|
||||
{
|
||||
if (Window->Self != pDCE->hwndCurrent)
|
||||
if (Window->hSelf != pDCE->hwndCurrent)
|
||||
{
|
||||
IntReleaseWindowObject(CurrentWindow);
|
||||
}
|
||||
pDCE = pDCE->next;
|
||||
continue;
|
||||
}
|
||||
if (Window == CurrentWindow || IntIsChildWindow(Window->Self, CurrentWindow->Self))
|
||||
if (Window == CurrentWindow || IntIsChildWindow(Window->hSelf, CurrentWindow->hSelf))
|
||||
{
|
||||
if (pDCE->DCXFlags & DCX_WINDOW)
|
||||
{
|
||||
|
@ -907,7 +907,7 @@ DceResetActiveDCEs(PWINDOW_OBJECT Window)
|
|||
|
||||
DceUpdateVisRgn(pDCE, CurrentWindow, pDCE->DCXFlags);
|
||||
|
||||
if (Window->Self != pDCE->hwndCurrent)
|
||||
if (Window->hSelf != pDCE->hwndCurrent)
|
||||
{
|
||||
// IntEngWindowChanged(CurrentWindow, WOC_RGN_CLIENT);
|
||||
IntReleaseWindowObject(CurrentWindow);
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -52,18 +52,18 @@
|
|||
BOOL FASTCALL
|
||||
IntGetClientOrigin(HWND hWnd, LPPOINT Point)
|
||||
{
|
||||
PWINDOW_OBJECT WindowObject;
|
||||
PWINDOW_OBJECT Window;
|
||||
|
||||
WindowObject = IntGetWindowObject((hWnd ? hWnd : IntGetDesktopWindow()));
|
||||
if (WindowObject == NULL)
|
||||
Window = IntGetWindowObject((hWnd ? hWnd : IntGetDesktopWindow()));
|
||||
if (Window == NULL)
|
||||
{
|
||||
Point->x = Point->y = 0;
|
||||
return FALSE;
|
||||
}
|
||||
Point->x = WindowObject->ClientRect.left;
|
||||
Point->y = WindowObject->ClientRect.top;
|
||||
Point->x = Window->ClientRect.left;
|
||||
Point->y = Window->ClientRect.top;
|
||||
|
||||
IntReleaseWindowObject(WindowObject);
|
||||
IntReleaseWindowObject(Window);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -172,7 +172,7 @@ co_WinPosActivateOtherWindow(PWINDOW_OBJECT Window)
|
|||
IntReleaseWindowObject(Old);
|
||||
break;
|
||||
}
|
||||
Wnd = IntGetWindowObject(Old->NextSibling->Self);
|
||||
Wnd = IntGetWindowObject(Old->NextSibling->hSelf);
|
||||
if (Old != Window)
|
||||
IntReleaseWindowObject(Old);
|
||||
if ((Wnd->Style & (WS_DISABLED | WS_VISIBLE)) == WS_VISIBLE &&
|
||||
|
@ -182,7 +182,7 @@ co_WinPosActivateOtherWindow(PWINDOW_OBJECT Window)
|
|||
|
||||
done:
|
||||
Fg = UserGetForegroundWindow();
|
||||
if (Wnd && (!Fg || Window->Self == Fg))
|
||||
if (Wnd && (!Fg || Window->hSelf == Fg))
|
||||
{
|
||||
if (co_IntSetForegroundWindow(Wnd))
|
||||
{
|
||||
|
@ -244,17 +244,17 @@ WinPosFindIconPos(PWINDOW_OBJECT Window, POINT *Pos)
|
|||
}
|
||||
|
||||
PINTERNALPOS FASTCALL
|
||||
WinPosInitInternalPos(PWINDOW_OBJECT WindowObject, POINT *pt, PRECT RestoreRect)
|
||||
WinPosInitInternalPos(PWINDOW_OBJECT Window, POINT *pt, PRECT RestoreRect)
|
||||
{
|
||||
PWINDOW_OBJECT Parent;
|
||||
UINT XInc, YInc;
|
||||
|
||||
if (WindowObject->InternalPos == NULL)
|
||||
if (Window->InternalPos == NULL)
|
||||
{
|
||||
RECT WorkArea;
|
||||
PDESKTOP_OBJECT Desktop = PsGetWin32Thread()->Desktop; /* Or rather get it from the window? */
|
||||
|
||||
Parent = IntGetParentObject(WindowObject);
|
||||
Parent = IntGetParentObject(Window);
|
||||
if(Parent)
|
||||
{
|
||||
if(IntIsDesktopWindow(Parent))
|
||||
|
@ -266,51 +266,50 @@ WinPosInitInternalPos(PWINDOW_OBJECT WindowObject, POINT *pt, PRECT RestoreRect)
|
|||
else
|
||||
IntGetDesktopWorkArea(Desktop, &WorkArea);
|
||||
|
||||
WindowObject->InternalPos = ExAllocatePoolWithTag(PagedPool, sizeof(INTERNALPOS), TAG_WININTLIST);
|
||||
if(!WindowObject->InternalPos)
|
||||
Window->InternalPos = ExAllocatePoolWithTag(PagedPool, sizeof(INTERNALPOS), TAG_WININTLIST);
|
||||
if(!Window->InternalPos)
|
||||
{
|
||||
DPRINT1("Failed to allocate INTERNALPOS structure for window 0x%x\n", WindowObject->Self);
|
||||
DPRINT1("Failed to allocate INTERNALPOS structure for window 0x%x\n", Window->hSelf);
|
||||
return NULL;
|
||||
}
|
||||
WindowObject->InternalPos->NormalRect = WindowObject->WindowRect;
|
||||
IntGetWindowBorderMeasures(WindowObject, &XInc, &YInc);
|
||||
WindowObject->InternalPos->MaxPos.x = WorkArea.left - XInc;
|
||||
WindowObject->InternalPos->MaxPos.y = WorkArea.top - YInc;
|
||||
WindowObject->InternalPos->IconPos.x = WorkArea.left;
|
||||
WindowObject->InternalPos->IconPos.y = WorkArea.bottom - UserGetSystemMetrics(SM_CYMINIMIZED);
|
||||
Window->InternalPos->NormalRect = Window->WindowRect;
|
||||
IntGetWindowBorderMeasures(Window, &XInc, &YInc);
|
||||
Window->InternalPos->MaxPos.x = WorkArea.left - XInc;
|
||||
Window->InternalPos->MaxPos.y = WorkArea.top - YInc;
|
||||
Window->InternalPos->IconPos.x = WorkArea.left;
|
||||
Window->InternalPos->IconPos.y = WorkArea.bottom - UserGetSystemMetrics(SM_CYMINIMIZED);
|
||||
}
|
||||
if (WindowObject->Style & WS_MINIMIZE)
|
||||
if (Window->Style & WS_MINIMIZE)
|
||||
{
|
||||
WindowObject->InternalPos->IconPos = *pt;
|
||||
Window->InternalPos->IconPos = *pt;
|
||||
}
|
||||
else if (WindowObject->Style & WS_MAXIMIZE)
|
||||
else if (Window->Style & WS_MAXIMIZE)
|
||||
{
|
||||
WindowObject->InternalPos->MaxPos = *pt;
|
||||
Window->InternalPos->MaxPos = *pt;
|
||||
}
|
||||
else if (RestoreRect != NULL)
|
||||
{
|
||||
WindowObject->InternalPos->NormalRect = *RestoreRect;
|
||||
Window->InternalPos->NormalRect = *RestoreRect;
|
||||
}
|
||||
return(WindowObject->InternalPos);
|
||||
return(Window->InternalPos);
|
||||
}
|
||||
|
||||
UINT FASTCALL
|
||||
co_WinPosMinMaximize(PWINDOW_OBJECT WindowObject, UINT ShowFlag, RECT* NewPos)
|
||||
co_WinPosMinMaximize(PWINDOW_OBJECT Window, UINT ShowFlag, RECT* NewPos)
|
||||
{
|
||||
POINT Size;
|
||||
PINTERNALPOS InternalPos;
|
||||
UINT SwpFlags = 0;
|
||||
|
||||
Size.x = WindowObject->WindowRect.left;
|
||||
Size.y = WindowObject->WindowRect.top;
|
||||
InternalPos = WinPosInitInternalPos(WindowObject, &Size,
|
||||
&WindowObject->WindowRect);
|
||||
Size.x = Window->WindowRect.left;
|
||||
Size.y = Window->WindowRect.top;
|
||||
InternalPos = WinPosInitInternalPos(Window, &Size, &Window->WindowRect);
|
||||
|
||||
if (InternalPos)
|
||||
{
|
||||
if (WindowObject->Style & WS_MINIMIZE)
|
||||
if (Window->Style & WS_MINIMIZE)
|
||||
{
|
||||
if (!co_IntSendMessage(WindowObject->Self, WM_QUERYOPEN, 0, 0))
|
||||
if (!co_IntSendMessage(Window->hSelf, WM_QUERYOPEN, 0, 0))
|
||||
{
|
||||
return(SWP_NOSIZE | SWP_NOMOVE);
|
||||
}
|
||||
|
@ -320,19 +319,19 @@ co_WinPosMinMaximize(PWINDOW_OBJECT WindowObject, UINT ShowFlag, RECT* NewPos)
|
|||
{
|
||||
case SW_MINIMIZE:
|
||||
{
|
||||
if (WindowObject->Style & WS_MAXIMIZE)
|
||||
if (Window->Style & WS_MAXIMIZE)
|
||||
{
|
||||
WindowObject->Flags |= WINDOWOBJECT_RESTOREMAX;
|
||||
WindowObject->Style &= ~WS_MAXIMIZE;
|
||||
Window->Flags |= WINDOWOBJECT_RESTOREMAX;
|
||||
Window->Style &= ~WS_MAXIMIZE;
|
||||
}
|
||||
else
|
||||
{
|
||||
WindowObject->Flags &= ~WINDOWOBJECT_RESTOREMAX;
|
||||
Window->Flags &= ~WINDOWOBJECT_RESTOREMAX;
|
||||
}
|
||||
co_UserRedrawWindow(WindowObject, NULL, 0, RDW_VALIDATE | RDW_NOERASE |
|
||||
co_UserRedrawWindow(Window, NULL, 0, RDW_VALIDATE | RDW_NOERASE |
|
||||
RDW_NOINTERNALPAINT);
|
||||
WindowObject->Style |= WS_MINIMIZE;
|
||||
WinPosFindIconPos(WindowObject, &InternalPos->IconPos);
|
||||
Window->Style |= WS_MINIMIZE;
|
||||
WinPosFindIconPos(Window, &InternalPos->IconPos);
|
||||
IntGdiSetRect(NewPos, InternalPos->IconPos.x, InternalPos->IconPos.y,
|
||||
UserGetSystemMetrics(SM_CXMINIMIZED),
|
||||
UserGetSystemMetrics(SM_CYMINIMIZED));
|
||||
|
@ -342,15 +341,15 @@ co_WinPosMinMaximize(PWINDOW_OBJECT WindowObject, UINT ShowFlag, RECT* NewPos)
|
|||
|
||||
case SW_MAXIMIZE:
|
||||
{
|
||||
co_WinPosGetMinMaxInfo(WindowObject, &Size, &InternalPos->MaxPos,
|
||||
co_WinPosGetMinMaxInfo(Window, &Size, &InternalPos->MaxPos,
|
||||
NULL, NULL);
|
||||
DPRINT("Maximize: %d,%d %dx%d\n",
|
||||
InternalPos->MaxPos.x, InternalPos->MaxPos.y, Size.x, Size.y);
|
||||
if (WindowObject->Style & WS_MINIMIZE)
|
||||
if (Window->Style & WS_MINIMIZE)
|
||||
{
|
||||
WindowObject->Style &= ~WS_MINIMIZE;
|
||||
Window->Style &= ~WS_MINIMIZE;
|
||||
}
|
||||
WindowObject->Style |= WS_MAXIMIZE;
|
||||
Window->Style |= WS_MAXIMIZE;
|
||||
IntGdiSetRect(NewPos, InternalPos->MaxPos.x, InternalPos->MaxPos.y,
|
||||
Size.x, Size.y);
|
||||
break;
|
||||
|
@ -358,14 +357,14 @@ co_WinPosMinMaximize(PWINDOW_OBJECT WindowObject, UINT ShowFlag, RECT* NewPos)
|
|||
|
||||
case SW_RESTORE:
|
||||
{
|
||||
if (WindowObject->Style & WS_MINIMIZE)
|
||||
if (Window->Style & WS_MINIMIZE)
|
||||
{
|
||||
WindowObject->Style &= ~WS_MINIMIZE;
|
||||
if (WindowObject->Flags & WINDOWOBJECT_RESTOREMAX)
|
||||
Window->Style &= ~WS_MINIMIZE;
|
||||
if (Window->Flags & WINDOWOBJECT_RESTOREMAX)
|
||||
{
|
||||
co_WinPosGetMinMaxInfo(WindowObject, &Size,
|
||||
co_WinPosGetMinMaxInfo(Window, &Size,
|
||||
&InternalPos->MaxPos, NULL, NULL);
|
||||
WindowObject->Style |= WS_MAXIMIZE;
|
||||
Window->Style |= WS_MAXIMIZE;
|
||||
IntGdiSetRect(NewPos, InternalPos->MaxPos.x,
|
||||
InternalPos->MaxPos.y, Size.x, Size.y);
|
||||
break;
|
||||
|
@ -380,11 +379,11 @@ co_WinPosMinMaximize(PWINDOW_OBJECT WindowObject, UINT ShowFlag, RECT* NewPos)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!(WindowObject->Style & WS_MAXIMIZE))
|
||||
if (!(Window->Style & WS_MAXIMIZE))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
WindowObject->Style &= ~WS_MAXIMIZE;
|
||||
Window->Style &= ~WS_MAXIMIZE;
|
||||
*NewPos = InternalPos->NormalRect;
|
||||
NewPos->right -= NewPos->left;
|
||||
NewPos->bottom -= NewPos->top;
|
||||
|
@ -440,7 +439,7 @@ co_WinPosGetMinMaxInfo(PWINDOW_OBJECT Window, POINT* MaxSize, POINT* MaxPos,
|
|||
|
||||
WinPosFillMinMaxInfoStruct(Window, &MinMax);
|
||||
|
||||
co_IntSendMessage(Window->Self, WM_GETMINMAXINFO, 0, (LPARAM)&MinMax);
|
||||
co_IntSendMessage(Window->hSelf, WM_GETMINMAXINFO, 0, (LPARAM)&MinMax);
|
||||
|
||||
MinMax.ptMaxTrackSize.x = max(MinMax.ptMaxTrackSize.x,
|
||||
MinMax.ptMinTrackSize.x);
|
||||
|
@ -521,7 +520,7 @@ co_WinPosDoNCCALCSize(PWINDOW_OBJECT Window, PWINDOWPOS WinPos,
|
|||
params.lppos = &winposCopy;
|
||||
winposCopy = *WinPos;
|
||||
|
||||
wvrFlags = co_IntSendMessage(Window->Self, WM_NCCALCSIZE, TRUE, (LPARAM) ¶ms);
|
||||
wvrFlags = co_IntSendMessage(Window->hSelf, WM_NCCALCSIZE, TRUE, (LPARAM) ¶ms);
|
||||
|
||||
/* If the application send back garbage, ignore it */
|
||||
if (params.rgrc[0].left <= params.rgrc[0].right &&
|
||||
|
@ -568,7 +567,7 @@ co_WinPosDoNCCALCSize(PWINDOW_OBJECT Window, PWINDOWPOS WinPos,
|
|||
}
|
||||
|
||||
BOOL FASTCALL
|
||||
co_WinPosDoWinPosChanging(PWINDOW_OBJECT WindowObject,
|
||||
co_WinPosDoWinPosChanging(PWINDOW_OBJECT Window,
|
||||
PWINDOWPOS WinPos,
|
||||
PRECT WindowRect,
|
||||
PRECT ClientRect)
|
||||
|
@ -577,11 +576,11 @@ co_WinPosDoWinPosChanging(PWINDOW_OBJECT WindowObject,
|
|||
|
||||
if (!(WinPos->flags & SWP_NOSENDCHANGING))
|
||||
{
|
||||
co_IntSendMessage(WindowObject->Self, WM_WINDOWPOSCHANGING, 0, (LPARAM) WinPos);
|
||||
co_IntSendMessage(Window->hSelf, WM_WINDOWPOSCHANGING, 0, (LPARAM) WinPos);
|
||||
}
|
||||
|
||||
*WindowRect = WindowObject->WindowRect;
|
||||
*ClientRect = WindowObject->ClientRect;
|
||||
*WindowRect = Window->WindowRect;
|
||||
*ClientRect = Window->ClientRect;
|
||||
|
||||
if (!(WinPos->flags & SWP_NOSIZE))
|
||||
{
|
||||
|
@ -594,8 +593,8 @@ co_WinPosDoWinPosChanging(PWINDOW_OBJECT WindowObject,
|
|||
PWINDOW_OBJECT Parent;
|
||||
X = WinPos->x;
|
||||
Y = WinPos->y;
|
||||
Parent = IntGetParentObject(WindowObject);
|
||||
if ((0 != (WindowObject->Style & WS_CHILD)) && Parent)
|
||||
Parent = IntGetParentObject(Window);
|
||||
if ((0 != (Window->Style & WS_CHILD)) && Parent)
|
||||
{
|
||||
X += Parent->ClientRect.left;
|
||||
Y += Parent->ClientRect.top;
|
||||
|
@ -604,11 +603,11 @@ co_WinPosDoWinPosChanging(PWINDOW_OBJECT WindowObject,
|
|||
IntReleaseWindowObject(Parent);
|
||||
WindowRect->left = X;
|
||||
WindowRect->top = Y;
|
||||
WindowRect->right += X - WindowObject->WindowRect.left;
|
||||
WindowRect->bottom += Y - WindowObject->WindowRect.top;
|
||||
WindowRect->right += X - Window->WindowRect.left;
|
||||
WindowRect->bottom += Y - Window->WindowRect.top;
|
||||
IntGdiOffsetRect(ClientRect,
|
||||
X - WindowObject->WindowRect.left,
|
||||
Y - WindowObject->WindowRect.top);
|
||||
X - Window->WindowRect.left,
|
||||
Y - Window->WindowRect.top);
|
||||
}
|
||||
|
||||
WinPos->flags |= SWP_NOCLIENTMOVE | SWP_NOCLIENTSIZE;
|
||||
|
@ -808,7 +807,7 @@ WinPosFixupFlags(WINDOWPOS *WinPos, PWINDOW_OBJECT Window)
|
|||
{
|
||||
PWINDOW_OBJECT Parent = IntGetParentObject(Window);
|
||||
if (UserGetAncestor(WinPos->hwndInsertAfter, GA_PARENT) !=
|
||||
(Parent ? Parent->Self : NULL))
|
||||
(Parent ? Parent->hSelf : NULL))
|
||||
{
|
||||
if(Parent)
|
||||
IntReleaseWindowObject(Parent);
|
||||
|
@ -1277,7 +1276,7 @@ co_WinPosShowWindow(HWND Wnd, INT Cmd)
|
|||
return(FALSE);
|
||||
}
|
||||
Swp |= SWP_HIDEWINDOW | SWP_NOSIZE | SWP_NOMOVE;
|
||||
if (Window->Self != UserGetActiveWindow())
|
||||
if (Window->hSelf != UserGetActiveWindow())
|
||||
Swp |= SWP_NOACTIVATE | SWP_NOZORDER;
|
||||
break;
|
||||
}
|
||||
|
@ -1363,7 +1362,7 @@ co_WinPosShowWindow(HWND Wnd, INT Cmd)
|
|||
Swp |= SWP_NOACTIVATE | SWP_NOZORDER;
|
||||
}
|
||||
|
||||
co_WinPosSetWindowPos(Window->Self, 0 != (Window->ExStyle & WS_EX_TOPMOST)
|
||||
co_WinPosSetWindowPos(Window->hSelf, 0 != (Window->ExStyle & WS_EX_TOPMOST)
|
||||
? HWND_TOPMOST : HWND_TOP,
|
||||
NewPos.left, NewPos.top, NewPos.right, NewPos.bottom, LOWORD(Swp));
|
||||
|
||||
|
@ -1374,7 +1373,7 @@ co_WinPosShowWindow(HWND Wnd, INT Cmd)
|
|||
* asynchronously.
|
||||
*/
|
||||
|
||||
if (Window->Self == UserGetActiveWindow())
|
||||
if (Window->hSelf == UserGetActiveWindow())
|
||||
{
|
||||
co_WinPosActivateOtherWindow(Window);
|
||||
}
|
||||
|
@ -1484,7 +1483,7 @@ co_WinPosSearchChildren(
|
|||
|
||||
if (OnlyHitTests && (Current->MessageQueue == OnlyHitTests))
|
||||
{
|
||||
*HitTest = co_IntSendMessage(Current->Self, WM_NCHITTEST, 0,
|
||||
*HitTest = co_IntSendMessage(Current->hSelf, WM_NCHITTEST, 0,
|
||||
MAKELONG(Point->x, Point->y));
|
||||
if ((*HitTest) == (USHORT)HTTRANSPARENT)
|
||||
continue;
|
||||
|
@ -1530,7 +1529,7 @@ co_WinPosWindowFromPoint(PWINDOW_OBJECT ScopeWin, PUSER_MESSAGE_QUEUE OnlyHitTes
|
|||
|
||||
/* Translate the point to the space of the scope window. */
|
||||
DesktopWindowHandle = IntGetDesktopWindow();
|
||||
if((DesktopWindowHandle != ScopeWin->Self) &&
|
||||
if((DesktopWindowHandle != ScopeWin->hSelf) &&
|
||||
(DesktopWindow = IntGetWindowObject(DesktopWindowHandle)))
|
||||
{
|
||||
Point.x += ScopeWin->ClientRect.left - DesktopWindow->ClientRect.left;
|
||||
|
|
Loading…
Reference in a new issue