mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 21:44:31 +00:00
- [Win32k] Update window structure.
svn path=/trunk/; revision=42108
This commit is contained in:
parent
04dbe9d46f
commit
928ed84e9f
|
@ -202,7 +202,7 @@ GetClassLongA(HWND hWnd, int nIndex)
|
|||
|
||||
_SEH2_TRY
|
||||
{
|
||||
Class = DesktopPtrToUser(Wnd->Class);
|
||||
Class = DesktopPtrToUser(Wnd->pcls);
|
||||
if (Class != NULL)
|
||||
{
|
||||
if (nIndex >= 0)
|
||||
|
@ -315,7 +315,7 @@ GetClassLongW ( HWND hWnd, int nIndex )
|
|||
|
||||
_SEH2_TRY
|
||||
{
|
||||
Class = DesktopPtrToUser(Wnd->Class);
|
||||
Class = DesktopPtrToUser(Wnd->pcls);
|
||||
if (Class != NULL)
|
||||
{
|
||||
if (nIndex >= 0)
|
||||
|
@ -504,7 +504,7 @@ GetWindowLongA ( HWND hWnd, int nIndex )
|
|||
|
||||
if (nIndex >= 0)
|
||||
{
|
||||
if ((DWORD)nIndex + sizeof(LONG) > Wnd->ExtraDataSize)
|
||||
if ((DWORD)nIndex + sizeof(LONG) > Wnd->cbwndExtra)
|
||||
{
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
|
@ -519,13 +519,13 @@ GetWindowLongA ( HWND hWnd, int nIndex )
|
|||
case GWL_EXSTYLE:
|
||||
return Wnd->ExStyle;
|
||||
case GWL_STYLE:
|
||||
return Wnd->Style;
|
||||
return Wnd->style;
|
||||
case GWL_HINSTANCE:
|
||||
return (LONG)Wnd->Instance;
|
||||
return (LONG)Wnd->hModule;
|
||||
case GWL_ID:
|
||||
return Wnd->IDMenu;
|
||||
case GWL_USERDATA:
|
||||
return Wnd->UserData;
|
||||
return Wnd->dwUserData;
|
||||
|
||||
case GWL_HWNDPARENT:
|
||||
{
|
||||
|
@ -561,7 +561,7 @@ GetWindowLongW(HWND hWnd, int nIndex)
|
|||
|
||||
if (nIndex >= 0)
|
||||
{
|
||||
if ((DWORD)nIndex + sizeof(LONG) > Wnd->ExtraDataSize)
|
||||
if ((DWORD)nIndex + sizeof(LONG) > Wnd->cbwndExtra)
|
||||
{
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
|
@ -576,13 +576,13 @@ GetWindowLongW(HWND hWnd, int nIndex)
|
|||
case GWL_EXSTYLE:
|
||||
return Wnd->ExStyle;
|
||||
case GWL_STYLE:
|
||||
return Wnd->Style;
|
||||
return Wnd->style;
|
||||
case GWL_HINSTANCE:
|
||||
return (LONG)Wnd->Instance;
|
||||
return (LONG)Wnd->hModule;
|
||||
case GWL_ID:
|
||||
return Wnd->IDMenu;
|
||||
case GWL_USERDATA:
|
||||
return Wnd->UserData;
|
||||
return Wnd->dwUserData;
|
||||
|
||||
case GWL_HWNDPARENT:
|
||||
{
|
||||
|
|
|
@ -120,12 +120,12 @@ UserGetInsideRectNC(PWINDOW Wnd, RECT *rect)
|
|||
ULONG Style;
|
||||
ULONG ExStyle;
|
||||
|
||||
Style = Wnd->Style;
|
||||
Style = Wnd->style;
|
||||
ExStyle = Wnd->ExStyle;
|
||||
|
||||
rect->top = rect->left = 0;
|
||||
rect->right = Wnd->WindowRect.right - Wnd->WindowRect.left;
|
||||
rect->bottom = Wnd->WindowRect.bottom - Wnd->WindowRect.top;
|
||||
rect->right = Wnd->rcWindow.right - Wnd->rcWindow.left;
|
||||
rect->bottom = Wnd->rcWindow.bottom - Wnd->rcWindow.top;
|
||||
|
||||
if (Style & WS_ICONIC)
|
||||
{
|
||||
|
@ -268,9 +268,9 @@ DefWndStartSizeMove(HWND hWnd, PWINDOW Wnd, WPARAM wParam, POINT *capturePoint)
|
|||
POINT pt;
|
||||
MSG msg;
|
||||
RECT rectWindow;
|
||||
ULONG Style = Wnd->Style;
|
||||
ULONG Style = Wnd->style;
|
||||
|
||||
rectWindow = Wnd->WindowRect;
|
||||
rectWindow = Wnd->rcWindow;
|
||||
|
||||
if ((wParam & 0xfff0) == SC_MOVE)
|
||||
{
|
||||
|
@ -415,7 +415,7 @@ DefWndDoSizeMove(HWND hwnd, WORD wParam)
|
|||
if (!Wnd)
|
||||
return;
|
||||
|
||||
Style = Wnd->Style;
|
||||
Style = Wnd->style;
|
||||
ExStyle = Wnd->ExStyle;
|
||||
iconic = (Style & WS_MINIMIZE) != 0;
|
||||
|
||||
|
@ -467,7 +467,7 @@ DefWndDoSizeMove(HWND hwnd, WORD wParam)
|
|||
/* Get min/max info */
|
||||
|
||||
WinPosGetMinMaxInfo(hwnd, NULL, NULL, &minTrack, &maxTrack);
|
||||
sizingRect = Wnd->WindowRect;
|
||||
sizingRect = Wnd->rcWindow;
|
||||
if (Style & WS_CHILD)
|
||||
{
|
||||
hWndParent = GetParent(hwnd);
|
||||
|
@ -1690,11 +1690,11 @@ User32DefWindowProc(HWND hWnd,
|
|||
break;
|
||||
}
|
||||
|
||||
if ((Wnd->Style & WS_CHILD) && Wnd->Parent != NULL)
|
||||
if ((Wnd->style & WS_CHILD) && Wnd->spwndParent != NULL)
|
||||
{
|
||||
/* We're a child window and we need to pass this message down until
|
||||
we reach the root */
|
||||
hWnd = UserHMGetHandle((PWINDOW)DesktopPtrToUser(Wnd->Parent));
|
||||
hWnd = UserHMGetHandle((PWINDOW)DesktopPtrToUser(Wnd->spwndParent));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1893,13 +1893,13 @@ DefWindowProcA(HWND hWnd,
|
|||
ULONG len;
|
||||
|
||||
Wnd = ValidateHwnd(hWnd);
|
||||
if (Wnd != NULL && Wnd->WindowName.Length != 0)
|
||||
if (Wnd != NULL && Wnd->strName.Length != 0)
|
||||
{
|
||||
buf = DesktopPtrToUser(Wnd->WindowName.Buffer);
|
||||
buf = DesktopPtrToUser(Wnd->strName.Buffer);
|
||||
if (buf != NULL &&
|
||||
NT_SUCCESS(RtlUnicodeToMultiByteSize(&len,
|
||||
buf,
|
||||
Wnd->WindowName.Length)))
|
||||
Wnd->strName.Length)))
|
||||
{
|
||||
Result = (LRESULT) len;
|
||||
}
|
||||
|
@ -1918,16 +1918,16 @@ DefWindowProcA(HWND hWnd,
|
|||
Wnd = ValidateHwnd(hWnd);
|
||||
if (Wnd != NULL && wParam != 0)
|
||||
{
|
||||
if (Wnd->WindowName.Buffer != NULL)
|
||||
buf = DesktopPtrToUser(Wnd->WindowName.Buffer);
|
||||
if (Wnd->strName.Buffer != NULL)
|
||||
buf = DesktopPtrToUser(Wnd->strName.Buffer);
|
||||
else
|
||||
outbuf[0] = L'\0';
|
||||
|
||||
if (buf != NULL)
|
||||
{
|
||||
if (Wnd->WindowName.Length != 0)
|
||||
if (Wnd->strName.Length != 0)
|
||||
{
|
||||
copy = min(Wnd->WindowName.Length / sizeof(WCHAR), wParam - 1);
|
||||
copy = min(Wnd->strName.Length / sizeof(WCHAR), wParam - 1);
|
||||
Result = WideCharToMultiByte(CP_ACP,
|
||||
0,
|
||||
buf,
|
||||
|
@ -2041,15 +2041,15 @@ DefWindowProcW(HWND hWnd,
|
|||
ULONG len;
|
||||
|
||||
Wnd = ValidateHwnd(hWnd);
|
||||
if (Wnd != NULL && Wnd->WindowName.Length != 0)
|
||||
if (Wnd != NULL && Wnd->strName.Length != 0)
|
||||
{
|
||||
buf = DesktopPtrToUser(Wnd->WindowName.Buffer);
|
||||
buf = DesktopPtrToUser(Wnd->strName.Buffer);
|
||||
if (buf != NULL &&
|
||||
NT_SUCCESS(RtlUnicodeToMultiByteSize(&len,
|
||||
buf,
|
||||
Wnd->WindowName.Length)))
|
||||
Wnd->strName.Length)))
|
||||
{
|
||||
Result = (LRESULT) (Wnd->WindowName.Length / sizeof(WCHAR));
|
||||
Result = (LRESULT) (Wnd->strName.Length / sizeof(WCHAR));
|
||||
}
|
||||
}
|
||||
else Result = 0L;
|
||||
|
@ -2065,16 +2065,16 @@ DefWindowProcW(HWND hWnd,
|
|||
Wnd = ValidateHwnd(hWnd);
|
||||
if (Wnd != NULL && wParam != 0)
|
||||
{
|
||||
if (Wnd->WindowName.Buffer != NULL)
|
||||
buf = DesktopPtrToUser(Wnd->WindowName.Buffer);
|
||||
if (Wnd->strName.Buffer != NULL)
|
||||
buf = DesktopPtrToUser(Wnd->strName.Buffer);
|
||||
else
|
||||
outbuf[0] = L'\0';
|
||||
|
||||
if (buf != NULL)
|
||||
{
|
||||
if (Wnd->WindowName.Length != 0)
|
||||
if (Wnd->strName.Length != 0)
|
||||
{
|
||||
Result = min(Wnd->WindowName.Length / sizeof(WCHAR), wParam - 1);
|
||||
Result = min(Wnd->strName.Length / sizeof(WCHAR), wParam - 1);
|
||||
RtlCopyMemory(outbuf,
|
||||
buf,
|
||||
Result * sizeof(WCHAR));
|
||||
|
|
|
@ -153,7 +153,7 @@ DIALOGINFO * DIALOG_get_info( HWND hWnd, BOOL create )
|
|||
{
|
||||
pWindow = ValidateHwnd( hWnd );
|
||||
|
||||
if (pWindow && pWindow->ExtraDataSize >= DLGWINDOWEXTRA && hWnd != GetDesktopWindow())
|
||||
if (pWindow && pWindow->cbwndExtra >= DLGWINDOWEXTRA && hWnd != GetDesktopWindow())
|
||||
{
|
||||
if (!(dlgInfo = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*dlgInfo) )))
|
||||
return NULL;
|
||||
|
|
|
@ -573,7 +573,7 @@ MenuDrawMenuItem(HWND hWnd, PROSMENUINFO MenuInfo, HWND WndOwner, HDC Dc,
|
|||
|
||||
if (0 != (Item->fType & MF_SYSMENU))
|
||||
{
|
||||
if ( (Wnd->Style & WS_MINIMIZE))
|
||||
if ( (Wnd->style & WS_MINIMIZE))
|
||||
{
|
||||
UserGetInsideRectNC(Wnd, &Rect);
|
||||
UserDrawSysMenuButton(hWnd, Dc, &Rect,
|
||||
|
|
|
@ -1311,12 +1311,12 @@ IntCallMessageProc(IN PWINDOW Wnd, IN HWND hWnd, IN UINT Msg, IN WPARAM wParam,
|
|||
|
||||
if (Wnd->IsSystem)
|
||||
{
|
||||
WndProc = (Ansi ? Wnd->WndProcExtra : Wnd->WndProc);
|
||||
WndProc = (Ansi ? Wnd->WndProcExtra : Wnd->lpfnWndProc);
|
||||
IsAnsi = Ansi;
|
||||
}
|
||||
else
|
||||
{
|
||||
WndProc = Wnd->WndProc;
|
||||
WndProc = Wnd->lpfnWndProc;
|
||||
IsAnsi = !Wnd->Unicode;
|
||||
}
|
||||
|
||||
|
@ -1361,7 +1361,7 @@ DispatchMessageA(CONST MSG *lpmsg)
|
|||
else if (Wnd != NULL)
|
||||
{
|
||||
// FIXME Need to test for calling proc inside win32k!
|
||||
if ( (lpmsg->message != WM_PAINT) ) // && !(Wnd->flags & WNDF_CALLPROC) )
|
||||
if ( (lpmsg->message != WM_PAINT) ) // && !(Wnd->state & WNDS_SERVERSIDEWINDOWPROC) )
|
||||
{
|
||||
Ret = IntCallMessageProc(Wnd,
|
||||
lpmsg->hwnd,
|
||||
|
@ -1422,7 +1422,7 @@ DispatchMessageW(CONST MSG *lpmsg)
|
|||
else if (Wnd != NULL)
|
||||
{
|
||||
// FIXME Need to test for calling proc inside win32k!
|
||||
if ( (lpmsg->message != WM_PAINT) ) // && !(Wnd->flags & W32K_CALLPROC) )
|
||||
if ( (lpmsg->message != WM_PAINT) ) // && !(Wnd->state & WNDS_SERVERSIDEWINDOWPROC) )
|
||||
{
|
||||
Ret = IntCallMessageProc(Wnd,
|
||||
lpmsg->hwnd,
|
||||
|
|
|
@ -850,8 +850,8 @@ GetAncestor(HWND hwnd, UINT gaFlags)
|
|||
switch (gaFlags)
|
||||
{
|
||||
case GA_PARENT:
|
||||
if (Wnd->Parent != NULL)
|
||||
Ancestor = DesktopPtrToUser(Wnd->Parent);
|
||||
if (Wnd->spwndParent != NULL)
|
||||
Ancestor = DesktopPtrToUser(Wnd->spwndParent);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -887,8 +887,8 @@ GetClientRect(HWND hWnd, LPRECT lpRect)
|
|||
if (Wnd != NULL)
|
||||
{
|
||||
lpRect->left = lpRect->top = 0;
|
||||
lpRect->right = Wnd->ClientRect.right - Wnd->ClientRect.left;
|
||||
lpRect->bottom = Wnd->ClientRect.bottom - Wnd->ClientRect.top;
|
||||
lpRect->right = Wnd->rcClient.right - Wnd->rcClient.left;
|
||||
lpRect->bottom = Wnd->rcClient.bottom - Wnd->rcClient.top;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -938,15 +938,15 @@ GetParent(HWND hWnd)
|
|||
_SEH2_TRY
|
||||
{
|
||||
WndParent = NULL;
|
||||
if (Wnd->Style & WS_CHILD)
|
||||
if (Wnd->style & WS_CHILD)
|
||||
{
|
||||
if (Wnd->Parent != NULL)
|
||||
WndParent = DesktopPtrToUser(Wnd->Parent);
|
||||
if (Wnd->spwndParent != NULL)
|
||||
WndParent = DesktopPtrToUser(Wnd->spwndParent);
|
||||
}
|
||||
else if (Wnd->Style & WS_POPUP)
|
||||
else if (Wnd->style & WS_POPUP)
|
||||
{
|
||||
if (Wnd->Owner != NULL)
|
||||
WndParent = DesktopPtrToUser(Wnd->Owner);
|
||||
if (Wnd->spwndOwner != NULL)
|
||||
WndParent = DesktopPtrToUser(Wnd->spwndOwner);
|
||||
}
|
||||
|
||||
if (WndParent != NULL)
|
||||
|
@ -1002,8 +1002,8 @@ GetWindow(HWND hWnd,
|
|||
switch (uCmd)
|
||||
{
|
||||
case GW_OWNER:
|
||||
if (Wnd->Owner != NULL)
|
||||
FoundWnd = DesktopPtrToUser(Wnd->Owner);
|
||||
if (Wnd->spwndOwner != NULL)
|
||||
FoundWnd = DesktopPtrToUser(Wnd->spwndOwner);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1099,7 +1099,7 @@ GetWindowRect(HWND hWnd,
|
|||
|
||||
if (Wnd != NULL)
|
||||
{
|
||||
*lpRect = Wnd->WindowRect;
|
||||
*lpRect = Wnd->rcWindow;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -1131,10 +1131,10 @@ GetWindowTextA(HWND hWnd, LPSTR lpString, int nMaxCount)
|
|||
if (nMaxCount > 0)
|
||||
{
|
||||
/* do not send WM_GETTEXT messages to other processes */
|
||||
Length = Wnd->WindowName.Length / sizeof(WCHAR);
|
||||
Length = Wnd->strName.Length / sizeof(WCHAR);
|
||||
if (Length != 0)
|
||||
{
|
||||
Buffer = DesktopPtrToUser(Wnd->WindowName.Buffer);
|
||||
Buffer = DesktopPtrToUser(Wnd->strName.Buffer);
|
||||
if (Buffer != NULL)
|
||||
{
|
||||
if (!WideCharToMultiByte(CP_ACP,
|
||||
|
@ -1221,10 +1221,10 @@ GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
|
|||
if (nMaxCount > 0)
|
||||
{
|
||||
/* do not send WM_GETTEXT messages to other processes */
|
||||
Length = Wnd->WindowName.Length / sizeof(WCHAR);
|
||||
Length = Wnd->strName.Length / sizeof(WCHAR);
|
||||
if (Length != 0)
|
||||
{
|
||||
Buffer = DesktopPtrToUser(Wnd->WindowName.Buffer);
|
||||
Buffer = DesktopPtrToUser(Wnd->strName.Buffer);
|
||||
if (Buffer != NULL)
|
||||
{
|
||||
RtlCopyMemory(lpString,
|
||||
|
@ -1312,9 +1312,9 @@ IsChild(HWND hWndParent,
|
|||
{
|
||||
while (Wnd != NULL)
|
||||
{
|
||||
if (Wnd->Parent != NULL)
|
||||
if (Wnd->spwndParent != NULL)
|
||||
{
|
||||
Wnd = DesktopPtrToUser(Wnd->Parent);
|
||||
Wnd = DesktopPtrToUser(Wnd->spwndParent);
|
||||
if (Wnd == WndParent)
|
||||
{
|
||||
Ret = TRUE;
|
||||
|
@ -1344,7 +1344,7 @@ IsIconic(HWND hWnd)
|
|||
PWINDOW Wnd = ValidateHwnd(hWnd);
|
||||
|
||||
if (Wnd != NULL)
|
||||
return (Wnd->Style & WS_MINIMIZE) != 0;
|
||||
return (Wnd->style & WS_MINIMIZE) != 0;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1399,14 +1399,14 @@ IsWindowVisible(HWND hWnd)
|
|||
|
||||
do
|
||||
{
|
||||
if (!(Wnd->Style & WS_VISIBLE))
|
||||
if (!(Wnd->style & WS_VISIBLE))
|
||||
{
|
||||
Ret = FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
if (Wnd->Parent != NULL)
|
||||
Wnd = DesktopPtrToUser(Wnd->Parent);
|
||||
if (Wnd->spwndParent != NULL)
|
||||
Wnd = DesktopPtrToUser(Wnd->spwndParent);
|
||||
else
|
||||
break;
|
||||
|
||||
|
@ -1690,8 +1690,8 @@ MapWindowPoints(HWND hWndFrom, HWND hWndTo, LPPOINT lpPoints, UINT cPoints)
|
|||
if (!ToWnd)
|
||||
return 0;
|
||||
|
||||
Delta.x = FromWnd->ClientRect.left - ToWnd->ClientRect.left;
|
||||
Delta.y = FromWnd->ClientRect.top - ToWnd->ClientRect.top;
|
||||
Delta.x = FromWnd->rcClient.left - ToWnd->rcClient.left;
|
||||
Delta.y = FromWnd->rcClient.top - ToWnd->rcClient.top;
|
||||
|
||||
for (i = 0; i != cPoints; i++)
|
||||
{
|
||||
|
@ -1717,8 +1717,8 @@ ScreenToClient(HWND hWnd, LPPOINT lpPoint)
|
|||
|
||||
DesktopWnd = GetThreadDesktopWnd();
|
||||
|
||||
lpPoint->x += DesktopWnd->ClientRect.left - Wnd->ClientRect.left;
|
||||
lpPoint->y += DesktopWnd->ClientRect.top - Wnd->ClientRect.top;
|
||||
lpPoint->x += DesktopWnd->rcClient.left - Wnd->rcClient.left;
|
||||
lpPoint->y += DesktopWnd->rcClient.top - Wnd->rcClient.top;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1738,8 +1738,8 @@ ClientToScreen(HWND hWnd, LPPOINT lpPoint)
|
|||
|
||||
DesktopWnd = GetThreadDesktopWnd();
|
||||
|
||||
lpPoint->x += Wnd->ClientRect.left - DesktopWnd->ClientRect.left;
|
||||
lpPoint->y += Wnd->ClientRect.top - DesktopWnd->ClientRect.top;
|
||||
lpPoint->x += Wnd->rcClient.left - DesktopWnd->rcClient.left;
|
||||
lpPoint->y += Wnd->rcClient.top - DesktopWnd->rcClient.top;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -137,13 +137,100 @@ typedef struct _WINDOWCLASS
|
|||
} WINDOWCLASS, *PWINDOWCLASS;
|
||||
|
||||
|
||||
// Flags !Not Implemented!
|
||||
#define WNDF_CALLPROC 0x0004 // Call proc inside win32k.
|
||||
// State Flags !Not Implemented!
|
||||
#define WNDS_HASMENU 0X00000001
|
||||
#define WNDS_HASVERTICALSCROOLLBAR 0X00000002
|
||||
#define WNDS_HASHORIZONTALSCROLLBAR 0X00000004
|
||||
#define WNDS_HASCAPTION 0X00000008
|
||||
#define WNDS_SENDSIZEMOVEMSGS 0X00000010
|
||||
#define WNDS_MSGBOX 0X00000020
|
||||
#define WNDS_ACTIVEFRAME 0X00000040
|
||||
#define WNDS_HASSPB 0X00000080
|
||||
#define WNDS_NONCPAINT 0X00000100
|
||||
#define WNDS_SENDERASEBACKGROUND 0X00000200
|
||||
#define WNDS_ERASEBACKGROUND 0X00000400
|
||||
#define WNDS_SENDNCPAINT 0X00000800
|
||||
#define WNDS_INTERNALPAINT 0X00001000
|
||||
#define WNDS_UPDATEDIRTY 0X00002000
|
||||
#define WNDS_HIDDENPOPUP 0X00004000
|
||||
#define WNDS_FORCEMENUDRAW 0X00008000
|
||||
#define WNDS_DIALOGWINDOW 0X00010000
|
||||
#define WNDS_HASCREATESTRUCTNAME 0X00020000
|
||||
#define WNDS_SERVERSIDEWINDOWPROC 0x00040000 // Call proc inside win32k.
|
||||
#define WNDS_ANSIWINDOWPROC 0x00080000
|
||||
#define WNDS_BEGINGACTIVATED 0x00100000
|
||||
#define WNDS_HASPALETTE 0x00200000
|
||||
#define WNDS_PAINTNOTPROCESSED 0x00400000
|
||||
#define WNDS_SYNCPAINTPENDING 0x00800000
|
||||
#define WNDS_RECIEVEDQUERYSUSPENDMSG 0x01000000
|
||||
#define WNDS_RECIEVEDSUSPENDMSG 0x02000000
|
||||
#define WNDS_TOGGLETOPMOST 0x04000000
|
||||
#define WNDS_REDRAWIFHUNG 0x08000000
|
||||
#define WNDS_REDRAWFRAMEIFHUNG 0x10000000
|
||||
#define WNDS_ANSICREATOR 0x20000000
|
||||
#define WNDS_MAXIMIZESTOMONITOR 0x40000000
|
||||
#define WNDS_DESTROYED 0x80000000
|
||||
|
||||
// State2 Flags !Not Implemented!
|
||||
#define WNDS2_WMPAINTSENT 0X00000001
|
||||
#define WNDS2_ENDPAINTINVALIDATE 0X00000002
|
||||
#define WNDS2_STARTPAINT 0X00000004
|
||||
#define WNDS2_OLDUI 0X00000008
|
||||
#define WNDS2_HASCLIENTEDGE 0X00000010
|
||||
#define WNDS2_BOTTOMMOST 0X00000020
|
||||
#define WNDS2_FULLSCREEN 0X00000040
|
||||
#define WNDS2_INDESTROY 0X00000080
|
||||
#define WNDS2_WIN31COMPAT 0X00000100
|
||||
#define WNDS2_WIN40COMPAT 0X00000200
|
||||
#define WNDS2_WIN50COMPAT 0X00000400
|
||||
#define WNDS2_MAXIMIZEDMONITORREGION 0X00000800
|
||||
#define WNDS2_CLOSEBUTTONDOWN 0X00001000
|
||||
#define WNDS2_MAXIMIZEBUTTONDOWN 0X00002000
|
||||
#define WNDS2_MINIMIZEBUTTONDOWN 0X00004000
|
||||
#define WNDS2_HELPBUTTONDOWN 0X00008000
|
||||
#define WNDS2_SCROLLBARLINEUPBTNDOWN 0X00010000
|
||||
#define WNDS2_SCROLLBARPAGEUPBTNDOWN 0X00020000
|
||||
#define WNDS2_SCROLLBARPAGEDOWNBTNDOWN 0X00040000
|
||||
#define WNDS2_SCROLLBARLINEDOWNBTNDOWN 0X00080000
|
||||
#define WNDS2_ANYSCROLLBUTTONDOWN 0X00100000
|
||||
#define WNDS2_SCROLLBARVERTICALTRACKING 0X00200000
|
||||
#define WNDS2_FORCENCPAINT 0X00400000
|
||||
#define WNDS2_FORCEFULLNCPAINTCLIPRGN 0X00800000
|
||||
#define WNDS2_FULLSCREENMODE 0X01000000
|
||||
#define WNDS2_CAPTIONTEXTTRUNCATED 0X08000000
|
||||
#define WNDS2_NOMINMAXANIMATERECTS 0X10000000
|
||||
#define WNDS2_SMALLICONFROMWMQUERYDRAG 0X20000000
|
||||
#define WNDS2_SHELLHOOKREGISTERED 0X40000000
|
||||
#define WNDS2_WMCREATEMSGPROCESSED 0X80000000
|
||||
|
||||
/* Non SDK ExStyles */
|
||||
#define WS_EX_MAKEVISIBLEWHENUNGHOSTED 0x00000800
|
||||
#define WS_EX_UISTATEACTIVE 0x04000000
|
||||
#define WS_EX_REDIRECTED 0X20000000
|
||||
#define WS_EX_UISTATEKBACCELHIDDEN 0X40000000
|
||||
#define WS_EX_UISTATEFOCUSRECTHIDDEN 0X80000000
|
||||
|
||||
/* Non SDK Styles */
|
||||
#define WS_MAXIMIZED 0X01000000
|
||||
#define WS_MINIMIZED 0X20000000
|
||||
|
||||
/* ExStyles2 */
|
||||
#define WS_EX2_CLIPBOARDLISTENER 0X00000001
|
||||
#define WS_EX2_LAYEREDINVALIDATE 0X00000002
|
||||
#define WS_EX2_REDIRECTEDFORPRINT 0X00000004
|
||||
#define WS_EX2_LINKED 0X00000008
|
||||
#define WS_EX2_LAYEREDFORDWM 0X00000010
|
||||
#define WS_EX2_LAYEREDLIMBO 0X00000020
|
||||
#define WS_EX2_HIGHTDPI_UNAWAR 0X00000040
|
||||
#define WS_EX2_VERTICALLYMAXIMIZEDLEFT 0X00000080
|
||||
#define WS_EX2_VERTICALLYMAXIMIZEDRIGHT 0X00000100
|
||||
#define WS_EX2_HASOVERLAY 0X00000200
|
||||
#define WS_EX2_CONSOLEWINDOW 0X00000400
|
||||
#define WS_EX2_CHILDNOACTIVATE 0X00000800
|
||||
|
||||
typedef struct _WINDOW
|
||||
{
|
||||
USER_OBJHDR hdr; /* FIXME: Move out of the structure once new handle manager is implemented */
|
||||
|
||||
/* NOTE: This structure is located in the desktop heap and will
|
||||
eventually replace WINDOW_OBJECT. Right now WINDOW_OBJECT
|
||||
keeps a reference to this structure until all the information
|
||||
|
@ -151,10 +238,24 @@ typedef struct _WINDOW
|
|||
struct _PROCESSINFO *pi; /* FIXME: Move to object header some day */
|
||||
struct _W32THREADINFO *ti;
|
||||
struct _DESKTOP *pdesktop;
|
||||
RECT WindowRect;
|
||||
RECT ClientRect;
|
||||
|
||||
WNDPROC WndProc;
|
||||
DWORD state;
|
||||
DWORD state2;
|
||||
/* Extended style. */
|
||||
DWORD ExStyle;
|
||||
/* Style. */
|
||||
DWORD style;
|
||||
/* Handle of the module that created the window. */
|
||||
HINSTANCE hModule;
|
||||
DWORD fnid;
|
||||
struct _WINDOW *spwndNext;
|
||||
struct _WINDOW *spwndPrev;
|
||||
struct _WINDOW *spwndParent;
|
||||
struct _WINDOW *spwndChild;
|
||||
struct _WINDOW *spwndOwner;
|
||||
RECT rcWindow;
|
||||
RECT rcClient;
|
||||
WNDPROC lpfnWndProc;
|
||||
union
|
||||
{
|
||||
/* Pointer to a call procedure handle */
|
||||
|
@ -163,31 +264,32 @@ typedef struct _WINDOW
|
|||
WNDPROC WndProcExtra;
|
||||
};
|
||||
|
||||
struct _WINDOW *Parent;
|
||||
struct _WINDOW *Owner;
|
||||
|
||||
/* Size of the extra data associated with the window. */
|
||||
ULONG ExtraDataSize;
|
||||
/* Style. */
|
||||
DWORD Style;
|
||||
/* Extended style. */
|
||||
DWORD ExStyle;
|
||||
/* Handle of the module that created the window. */
|
||||
HINSTANCE Instance;
|
||||
/* Window menu handle or window id */
|
||||
UINT IDMenu;
|
||||
LONG UserData;
|
||||
/* Pointer to the window class. */
|
||||
PWINDOWCLASS Class;
|
||||
/* Window name. */
|
||||
UNICODE_STRING WindowName;
|
||||
/* Context help id */
|
||||
DWORD ContextHelpId;
|
||||
|
||||
HWND hWndLastActive;
|
||||
PWINDOWCLASS pcls;
|
||||
HRGN hrgnUpdate;
|
||||
/* Property list head.*/
|
||||
LIST_ENTRY PropListHead;
|
||||
ULONG PropListItems;
|
||||
/* Window menu handle or window id */
|
||||
UINT IDMenu;
|
||||
//PMENU spmenuSys;
|
||||
//PMENU spmenu;
|
||||
HRGN hrgnClip;
|
||||
/* Window name. */
|
||||
UNICODE_STRING strName;
|
||||
/* Size of the extra data associated with the window. */
|
||||
ULONG cbwndExtra;
|
||||
HWND hWndLastActive;
|
||||
struct _WINDOW *spwndLastActive;
|
||||
//HIMC hImc; // Input context associated with this window.
|
||||
LONG dwUserData;
|
||||
//PACTIVATION_CONTEXT pActCtx;
|
||||
//PD3DMATRIX pTransForm;
|
||||
struct _WINDOW *spwndClipboardListener;
|
||||
DWORD ExStyle2;
|
||||
|
||||
/* Context help id */
|
||||
DWORD ContextHelpId;
|
||||
|
||||
struct
|
||||
{
|
||||
|
@ -196,12 +298,12 @@ typedef struct _WINDOW
|
|||
POINT MaxPos;
|
||||
} InternalPos;
|
||||
|
||||
UINT Unicode : 1;
|
||||
UINT Unicode : 1; // !WNDS_ANSICREATOR ?
|
||||
/* Indicates whether the window is derived from a system class */
|
||||
UINT IsSystem : 1;
|
||||
UINT IsSystem : 1; // System class ?
|
||||
UINT InternalPosInitialized : 1;
|
||||
UINT HideFocus : 1;
|
||||
UINT HideAccel : 1;
|
||||
UINT HideFocus : 1; // WS_EX_UISTATEFOCUSRECTHIDDEN ?
|
||||
UINT HideAccel : 1; // WS_EX_UISTATEKBACCELHIDDEN ?
|
||||
} WINDOW, *PWINDOW;
|
||||
|
||||
typedef struct _PFNCLIENT
|
||||
|
|
|
@ -88,7 +88,7 @@ IntEngWndUpdateClipObj(
|
|||
hVisRgn = VIS_ComputeVisibleRegion(Window, TRUE, TRUE, TRUE);
|
||||
if (hVisRgn != NULL)
|
||||
{
|
||||
NtGdiOffsetRgn(hVisRgn, Window->Wnd->ClientRect.left, Window->Wnd->ClientRect.top);
|
||||
NtGdiOffsetRgn(hVisRgn, Window->Wnd->rcClient.left, Window->Wnd->rcClient.top);
|
||||
visRgn = REGION_LockRgn(hVisRgn);
|
||||
if (visRgn != NULL)
|
||||
{
|
||||
|
@ -125,8 +125,8 @@ IntEngWndUpdateClipObj(
|
|||
if (ClipObj == NULL)
|
||||
{
|
||||
/* Fall back to client rect */
|
||||
ClipObj = IntEngCreateClipRegion(1, &Window->Wnd->ClientRect,
|
||||
&Window->Wnd->ClientRect);
|
||||
ClipObj = IntEngCreateClipRegion(1, &Window->Wnd->rcClient,
|
||||
&Window->Wnd->rcClient);
|
||||
}
|
||||
|
||||
if (ClipObj == NULL)
|
||||
|
@ -136,7 +136,7 @@ IntEngWndUpdateClipObj(
|
|||
}
|
||||
|
||||
RtlCopyMemory(&WndObjInt->WndObj.coClient, ClipObj, sizeof (CLIPOBJ));
|
||||
RtlCopyMemory(&WndObjInt->WndObj.rclClient, &Window->Wnd->ClientRect, sizeof (RECT));
|
||||
RtlCopyMemory(&WndObjInt->WndObj.rclClient, &Window->Wnd->rcClient, sizeof (RECT));
|
||||
OldClipObj = InterlockedExchangePointer(&WndObjInt->ClientClipObj, ClipObj);
|
||||
if (OldClipObj != NULL)
|
||||
IntEngDeleteClipRegion(OldClipObj);
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
#define WIN_NEEDS_SHOW_OWNEDPOPUP (0x00000140)
|
||||
|
||||
#define IntPtInWindow(WndObject,x,y) \
|
||||
((x) >= (WndObject)->Wnd->WindowRect.left && \
|
||||
(x) < (WndObject)->Wnd->WindowRect.right && \
|
||||
(y) >= (WndObject)->Wnd->WindowRect.top && \
|
||||
(y) < (WndObject)->Wnd->WindowRect.bottom && \
|
||||
(!(WndObject)->WindowRegion || ((WndObject)->Wnd->Style & WS_MINIMIZE) || \
|
||||
NtGdiPtInRegion((WndObject)->WindowRegion, (INT)((x) - (WndObject)->Wnd->WindowRect.left), \
|
||||
(INT)((y) - (WndObject)->Wnd->WindowRect.top))))
|
||||
((x) >= (WndObject)->Wnd->rcWindow.left && \
|
||||
(x) < (WndObject)->Wnd->rcWindow.right && \
|
||||
(y) >= (WndObject)->Wnd->rcWindow.top && \
|
||||
(y) < (WndObject)->Wnd->rcWindow.bottom && \
|
||||
(!(WndObject)->WindowRegion || ((WndObject)->Wnd->style & WS_MINIMIZE) || \
|
||||
NtGdiPtInRegion((WndObject)->WindowRegion, (INT)((x) - (WndObject)->Wnd->rcWindow.left), \
|
||||
(INT)((y) - (WndObject)->Wnd->rcWindow.top))))
|
||||
|
||||
UINT
|
||||
FASTCALL co_WinPosArrangeIconicWindows(PWINDOW_OBJECT parent);
|
||||
|
|
|
@ -2169,11 +2169,11 @@ NtUserGetClassLong(IN HWND hWnd,
|
|||
Window = UserGetWindowObject(hWnd);
|
||||
if (Window != NULL)
|
||||
{
|
||||
Ret = UserGetClassLongPtr(Window->Wnd->Class,
|
||||
Ret = UserGetClassLongPtr(Window->Wnd->pcls,
|
||||
Offset,
|
||||
Ansi);
|
||||
|
||||
if (Ret != 0 && Offset == GCLP_MENUNAME && Window->Wnd->Class->MenuNameIsString)
|
||||
if (Ret != 0 && Offset == GCLP_MENUNAME && Window->Wnd->pcls->MenuNameIsString)
|
||||
{
|
||||
Ret = (ULONG_PTR)UserHeapAddressToUser((PVOID)Ret);
|
||||
}
|
||||
|
@ -2247,7 +2247,7 @@ InvalidParameter:
|
|||
dwNewLong = (ULONG_PTR)&Value;
|
||||
}
|
||||
|
||||
Ret = UserSetClassLongPtr(Window->Wnd->Class,
|
||||
Ret = UserSetClassLongPtr(Window->Wnd->pcls,
|
||||
Offset,
|
||||
dwNewLong,
|
||||
Ansi);
|
||||
|
@ -2458,7 +2458,7 @@ NtUserGetClassName (IN HWND hWnd,
|
|||
CapturedClassName = *ClassName;
|
||||
|
||||
/* get the class name */
|
||||
Ret = UserGetClassName(Window->Wnd->Class,
|
||||
Ret = UserGetClassName(Window->Wnd->pcls,
|
||||
&CapturedClassName,
|
||||
Ansi);
|
||||
|
||||
|
|
|
@ -863,10 +863,10 @@ NtUserClipCursor(
|
|||
MOUSEINPUT mi;
|
||||
|
||||
CurInfo->CursorClipInfo.IsClipped = TRUE;
|
||||
CurInfo->CursorClipInfo.Left = max(Rect.left, DesktopWindow->Wnd->WindowRect.left);
|
||||
CurInfo->CursorClipInfo.Top = max(Rect.top, DesktopWindow->Wnd->WindowRect.top);
|
||||
CurInfo->CursorClipInfo.Right = min(Rect.right - 1, DesktopWindow->Wnd->WindowRect.right - 1);
|
||||
CurInfo->CursorClipInfo.Bottom = min(Rect.bottom - 1, DesktopWindow->Wnd->WindowRect.bottom - 1);
|
||||
CurInfo->CursorClipInfo.Left = max(Rect.left, DesktopWindow->Wnd->rcWindow.left);
|
||||
CurInfo->CursorClipInfo.Top = max(Rect.top, DesktopWindow->Wnd->rcWindow.top);
|
||||
CurInfo->CursorClipInfo.Right = min(Rect.right - 1, DesktopWindow->Wnd->rcWindow.right - 1);
|
||||
CurInfo->CursorClipInfo.Bottom = min(Rect.bottom - 1, DesktopWindow->Wnd->rcWindow.bottom - 1);
|
||||
|
||||
mi.dx = MousePos.x;
|
||||
mi.dy = MousePos.y;
|
||||
|
|
|
@ -127,8 +127,8 @@ IntDefWindowProc(
|
|||
}
|
||||
case WM_SHOWWINDOW:
|
||||
{
|
||||
if ((Wnd->Style & WS_VISIBLE) && wParam) break;
|
||||
if (!(Wnd->Style & WS_VISIBLE) && !wParam) break;
|
||||
if ((Wnd->style & WS_VISIBLE) && wParam) break;
|
||||
if (!(Wnd->style & WS_VISIBLE) && !wParam) break;
|
||||
if (!Window->hOwner) break;
|
||||
if (LOWORD(lParam))
|
||||
{
|
||||
|
|
|
@ -694,7 +694,7 @@ IntHideDesktop(PDESKTOP Desktop)
|
|||
return ERROR_INVALID_WINDOW_HANDLE;
|
||||
}
|
||||
DesktopWnd = DesktopWindow->Wnd;
|
||||
DesktopWnd->Style &= ~WS_VISIBLE;
|
||||
DesktopWnd->style &= ~WS_VISIBLE;
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
#endif
|
||||
|
@ -1498,7 +1498,7 @@ NtUserPaintDesktop(HDC hDC)
|
|||
RETURN(FALSE);
|
||||
}
|
||||
|
||||
DesktopBrush = (HBRUSH)UserGetClassLongPtr(WndDesktop->Wnd->Class, GCL_HBRBACKGROUND, FALSE);
|
||||
DesktopBrush = (HBRUSH)UserGetClassLongPtr(WndDesktop->Wnd->pcls, GCL_HBRBACKGROUND, FALSE);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -1517,8 +1517,8 @@ NtUserPaintDesktop(HDC hDC)
|
|||
int x, y;
|
||||
HDC hWallpaperDC;
|
||||
|
||||
sz.cx = DeskWin->Wnd->WindowRect.right - DeskWin->Wnd->WindowRect.left;
|
||||
sz.cy = DeskWin->Wnd->WindowRect.bottom - DeskWin->Wnd->WindowRect.top;
|
||||
sz.cx = DeskWin->Wnd->rcWindow.right - DeskWin->Wnd->rcWindow.left;
|
||||
sz.cy = DeskWin->Wnd->rcWindow.bottom - DeskWin->Wnd->rcWindow.top;
|
||||
|
||||
if (WinSta->WallpaperMode == wmStretch ||
|
||||
WinSta->WallpaperMode == wmTile)
|
||||
|
|
|
@ -93,8 +93,8 @@ co_IntSendActivateMessages(HWND hWndPrev, HWND hWnd, BOOL MouseActivate)
|
|||
if (Window->Wnd)
|
||||
{ // Set last active for window and it's owner.
|
||||
Window->Wnd->hWndLastActive = hWnd;
|
||||
if (Window->Wnd->Owner)
|
||||
Window->Wnd->Owner->hWndLastActive = hWnd;
|
||||
if (Window->Wnd->spwndOwner)
|
||||
Window->Wnd->spwndOwner->hWndLastActive = hWnd;
|
||||
}
|
||||
|
||||
if (Window && WindowPrev)
|
||||
|
@ -204,13 +204,13 @@ co_IntSetForegroundAndFocusWindow(PWINDOW_OBJECT Window, PWINDOW_OBJECT FocusWin
|
|||
|
||||
Wnd = Window->Wnd;
|
||||
|
||||
if ((Wnd->Style & (WS_CHILD | WS_POPUP)) == WS_CHILD)
|
||||
if ((Wnd->style & (WS_CHILD | WS_POPUP)) == WS_CHILD)
|
||||
{
|
||||
DPRINT("Failed - Child\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (0 == (Wnd->Style & WS_VISIBLE) &&
|
||||
if (0 == (Wnd->style & WS_VISIBLE) &&
|
||||
Window->OwnerThread->ThreadsProcess != CsrProcess)
|
||||
{
|
||||
DPRINT("Failed - Invisible\n");
|
||||
|
@ -278,7 +278,7 @@ co_IntMouseActivateWindow(PWINDOW_OBJECT Window)
|
|||
ASSERT_REFS_CO(Window);
|
||||
|
||||
Wnd = Window->Wnd;
|
||||
if(Wnd->Style & WS_DISABLED)
|
||||
if(Wnd->style & WS_DISABLED)
|
||||
{
|
||||
BOOL Ret;
|
||||
PWINDOW_OBJECT TopWnd;
|
||||
|
@ -332,9 +332,9 @@ co_IntSetActiveWindow(PWINDOW_OBJECT Window OPTIONAL)
|
|||
if (Window != 0)
|
||||
{
|
||||
Wnd = Window->Wnd;
|
||||
if ((!(Wnd->Style & WS_VISIBLE) &&
|
||||
if ((!(Wnd->style & WS_VISIBLE) &&
|
||||
Window->OwnerThread->ThreadsProcess != CsrProcess) ||
|
||||
(Wnd->Style & (WS_POPUP | WS_CHILD)) == WS_CHILD)
|
||||
(Wnd->style & (WS_POPUP | WS_CHILD)) == WS_CHILD)
|
||||
{
|
||||
return ThreadQueue ? 0 : ThreadQueue->ActiveWindow;
|
||||
}
|
||||
|
@ -585,7 +585,7 @@ HWND FASTCALL co_UserSetFocus(PWINDOW_OBJECT Window OPTIONAL)
|
|||
ThreadQueue = pti->MessageQueue;
|
||||
|
||||
Wnd = Window->Wnd;
|
||||
if (Wnd->Style & (WS_MINIMIZE | WS_DISABLED))
|
||||
if (Wnd->style & (WS_MINIMIZE | WS_DISABLED))
|
||||
{
|
||||
return( (ThreadQueue ? ThreadQueue->FocusWindow : 0));
|
||||
}
|
||||
|
|
|
@ -1144,10 +1144,10 @@ IntMouseInput(MOUSEINPUT *mi)
|
|||
|
||||
if (DesktopWindow)
|
||||
{
|
||||
if(MousePos.x >= DesktopWindow->Wnd->ClientRect.right)
|
||||
MousePos.x = DesktopWindow->Wnd->ClientRect.right - 1;
|
||||
if(MousePos.y >= DesktopWindow->Wnd->ClientRect.bottom)
|
||||
MousePos.y = DesktopWindow->Wnd->ClientRect.bottom - 1;
|
||||
if(MousePos.x >= DesktopWindow->Wnd->rcClient.right)
|
||||
MousePos.x = DesktopWindow->Wnd->rcClient.right - 1;
|
||||
if(MousePos.y >= DesktopWindow->Wnd->rcClient.bottom)
|
||||
MousePos.y = DesktopWindow->Wnd->rcClient.bottom - 1;
|
||||
UserDereferenceObject(DesktopWindow);
|
||||
}
|
||||
|
||||
|
|
|
@ -1335,13 +1335,13 @@ intGetTitleBarInfo(PWINDOW_OBJECT pWindowObject, PTITLEBARINFO bti)
|
|||
|
||||
bti->rgstate[0] = STATE_SYSTEM_FOCUSABLE;
|
||||
|
||||
dwStyle = pWindowObject->Wnd->Style;
|
||||
dwStyle = pWindowObject->Wnd->style;
|
||||
dwExStyle = pWindowObject->Wnd->ExStyle;
|
||||
|
||||
bti->rcTitleBar.top = 0;
|
||||
bti->rcTitleBar.left = 0;
|
||||
bti->rcTitleBar.right = pWindowObject->Wnd->WindowRect.right - pWindowObject->Wnd->WindowRect.left;
|
||||
bti->rcTitleBar.bottom = pWindowObject->Wnd->WindowRect.bottom - pWindowObject->Wnd->WindowRect.top;
|
||||
bti->rcTitleBar.right = pWindowObject->Wnd->rcWindow.right - pWindowObject->Wnd->rcWindow.left;
|
||||
bti->rcTitleBar.bottom = pWindowObject->Wnd->rcWindow.bottom - pWindowObject->Wnd->rcWindow.top;
|
||||
|
||||
/* is it iconiced ? */
|
||||
if ((dwStyle & WS_ICONIC)!=WS_ICONIC)
|
||||
|
@ -1382,9 +1382,9 @@ intGetTitleBarInfo(PWINDOW_OBJECT pWindowObject, PTITLEBARINFO bti)
|
|||
}
|
||||
}
|
||||
|
||||
bti->rcTitleBar.top += pWindowObject->Wnd->WindowRect.top;
|
||||
bti->rcTitleBar.left += pWindowObject->Wnd->WindowRect.left;
|
||||
bti->rcTitleBar.right += pWindowObject->Wnd->WindowRect.left;
|
||||
bti->rcTitleBar.top += pWindowObject->Wnd->rcWindow.top;
|
||||
bti->rcTitleBar.left += pWindowObject->Wnd->rcWindow.left;
|
||||
bti->rcTitleBar.right += pWindowObject->Wnd->rcWindow.left;
|
||||
|
||||
bti->rcTitleBar.bottom = bti->rcTitleBar.top;
|
||||
if (dwExStyle & WS_EX_TOOLWINDOW)
|
||||
|
@ -1425,7 +1425,7 @@ intGetTitleBarInfo(PWINDOW_OBJECT pWindowObject, PTITLEBARINFO bti)
|
|||
{
|
||||
bti->rgstate[4] = STATE_SYSTEM_INVISIBLE;
|
||||
}
|
||||
if (pWindowObject->Wnd->Class->Style & CS_NOCLOSE)
|
||||
if (pWindowObject->Wnd->pcls->Style & CS_NOCLOSE)
|
||||
{
|
||||
bti->rgstate[5] = STATE_SYSTEM_UNAVAILABLE;
|
||||
}
|
||||
|
@ -2122,13 +2122,13 @@ NtUserGetMenuItemRect(
|
|||
|
||||
if(MenuItem->fType & MF_POPUP)
|
||||
{
|
||||
XMove = ReferenceWnd->Wnd->ClientRect.left;
|
||||
YMove = ReferenceWnd->Wnd->ClientRect.top;
|
||||
XMove = ReferenceWnd->Wnd->rcClient.left;
|
||||
YMove = ReferenceWnd->Wnd->rcClient.top;
|
||||
}
|
||||
else
|
||||
{
|
||||
XMove = ReferenceWnd->Wnd->WindowRect.left;
|
||||
YMove = ReferenceWnd->Wnd->WindowRect.top;
|
||||
XMove = ReferenceWnd->Wnd->rcWindow.left;
|
||||
YMove = ReferenceWnd->Wnd->rcWindow.top;
|
||||
}
|
||||
|
||||
Rect.left += XMove;
|
||||
|
@ -2309,8 +2309,8 @@ NtUserMenuItemFromPoint(
|
|||
RETURN( -1);
|
||||
}
|
||||
|
||||
X -= Window->Wnd->WindowRect.left;
|
||||
Y -= Window->Wnd->WindowRect.top;
|
||||
X -= Window->Wnd->rcWindow.left;
|
||||
Y -= Window->Wnd->rcWindow.top;
|
||||
|
||||
mi = Menu->MenuItemList;
|
||||
for (i = 0; NULL != mi; i++)
|
||||
|
|
|
@ -694,7 +694,7 @@ co_IntTranslateMouseMessage(PUSER_MESSAGE_QUEUE ThreadQueue, LPMSG Msg, USHORT *
|
|||
{
|
||||
/* generate double click messages, if necessary */
|
||||
if ((((*HitTest) != HTCLIENT) ||
|
||||
(Window->Wnd->Class->Style & CS_DBLCLKS)) &&
|
||||
(Window->Wnd->pcls->Style & CS_DBLCLKS)) &&
|
||||
MsqIsDblClk(Msg, Remove))
|
||||
{
|
||||
Msg->message += WM_LBUTTONDBLCLK - WM_LBUTTONDOWN;
|
||||
|
@ -724,8 +724,8 @@ co_IntTranslateMouseMessage(PUSER_MESSAGE_QUEUE ThreadQueue, LPMSG Msg, USHORT *
|
|||
{
|
||||
/* NOTE: Msg->pt should remain in screen coordinates. -- FiN */
|
||||
Msg->lParam = MAKELONG(
|
||||
Msg->pt.x - (WORD)Window->Wnd->ClientRect.left,
|
||||
Msg->pt.y - (WORD)Window->Wnd->ClientRect.top);
|
||||
Msg->pt.x - (WORD)Window->Wnd->rcClient.left,
|
||||
Msg->pt.y - (WORD)Window->Wnd->rcClient.top);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1553,7 +1553,7 @@ co_IntSendMessageTimeoutSingle(HWND hWnd,
|
|||
RETURN( FALSE);
|
||||
}
|
||||
|
||||
Result = (ULONG_PTR)co_IntCallWindowProc(Window->Wnd->WndProc, !Window->Wnd->Unicode, hWnd, Msg, wParam,
|
||||
Result = (ULONG_PTR)co_IntCallWindowProc(Window->Wnd->lpfnWndProc, !Window->Wnd->Unicode, hWnd, Msg, wParam,
|
||||
lParamPacked,lParamBufferSize);
|
||||
|
||||
if(uResult)
|
||||
|
@ -1764,12 +1764,12 @@ co_IntDoSendMessage(HWND hWnd,
|
|||
|
||||
if (Window->Wnd->IsSystem)
|
||||
{
|
||||
Info.Proc = (!Info.Ansi ? Window->Wnd->WndProc : Window->Wnd->WndProcExtra);
|
||||
Info.Proc = (!Info.Ansi ? Window->Wnd->lpfnWndProc : Window->Wnd->WndProcExtra);
|
||||
}
|
||||
else
|
||||
{
|
||||
Info.Ansi = !Window->Wnd->Unicode;
|
||||
Info.Proc = Window->Wnd->WndProc;
|
||||
Info.Proc = Window->Wnd->lpfnWndProc;
|
||||
}
|
||||
|
||||
IntCallWndProcRet( Window, hWnd, Msg, wParam, lParam, &Result);
|
||||
|
|
|
@ -902,8 +902,8 @@ NtUserMonitorFromWindow(
|
|||
if (!Window->Wnd)
|
||||
RETURN(hMonitor);
|
||||
|
||||
Rect.left = Rect.right = Window->Wnd->WindowRect.left;
|
||||
Rect.top = Rect.bottom = Window->Wnd->WindowRect.bottom;
|
||||
Rect.left = Rect.right = Window->Wnd->rcWindow.left;
|
||||
Rect.top = Rect.bottom = Window->Wnd->rcWindow.bottom;
|
||||
|
||||
IntGetMonitorsFromRect(&Rect, &hMonitor, NULL, 1, dwFlags);
|
||||
|
||||
|
|
|
@ -64,13 +64,13 @@ IntIntersectWithParents(PWINDOW_OBJECT Child, RECTL *WindowRect)
|
|||
while (ParentWindow != NULL)
|
||||
{
|
||||
ParentWnd = ParentWindow->Wnd;
|
||||
if (!(ParentWnd->Style & WS_VISIBLE) ||
|
||||
(ParentWnd->Style & WS_MINIMIZE))
|
||||
if (!(ParentWnd->style & WS_VISIBLE) ||
|
||||
(ParentWnd->style & WS_MINIMIZE))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!RECTL_bIntersectRect(WindowRect, WindowRect, &ParentWnd->ClientRect))
|
||||
if (!RECTL_bIntersectRect(WindowRect, WindowRect, &ParentWnd->rcClient))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ IntValidateParent(PWINDOW_OBJECT Child, HRGN hValidateRgn, BOOL Recurse)
|
|||
while (ParentWindow)
|
||||
{
|
||||
ParentWnd = ParentWindow->Wnd;
|
||||
if (ParentWnd->Style & WS_CLIPCHILDREN)
|
||||
if (ParentWnd->style & WS_CLIPCHILDREN)
|
||||
break;
|
||||
|
||||
if (ParentWindow->UpdateRegion != 0)
|
||||
|
@ -125,19 +125,19 @@ IntCalcWindowRgn(PWINDOW_OBJECT Window, BOOL Client)
|
|||
|
||||
Wnd = Window->Wnd;
|
||||
if (Client)
|
||||
hRgnWindow = UnsafeIntCreateRectRgnIndirect(&Wnd->ClientRect);
|
||||
hRgnWindow = UnsafeIntCreateRectRgnIndirect(&Wnd->rcClient);
|
||||
else
|
||||
hRgnWindow = UnsafeIntCreateRectRgnIndirect(&Wnd->WindowRect);
|
||||
hRgnWindow = UnsafeIntCreateRectRgnIndirect(&Wnd->rcWindow);
|
||||
|
||||
if (Window->WindowRegion != NULL && !(Wnd->Style & WS_MINIMIZE))
|
||||
if (Window->WindowRegion != NULL && !(Wnd->style & WS_MINIMIZE))
|
||||
{
|
||||
NtGdiOffsetRgn(hRgnWindow,
|
||||
-Wnd->WindowRect.left,
|
||||
-Wnd->WindowRect.top);
|
||||
-Wnd->rcWindow.left,
|
||||
-Wnd->rcWindow.top);
|
||||
RgnType = NtGdiCombineRgn(hRgnWindow, hRgnWindow, Window->WindowRegion, RGN_AND);
|
||||
NtGdiOffsetRgn(hRgnWindow,
|
||||
Wnd->WindowRect.left,
|
||||
Wnd->WindowRect.top);
|
||||
Wnd->rcWindow.left,
|
||||
Wnd->rcWindow.top);
|
||||
}
|
||||
|
||||
return hRgnWindow;
|
||||
|
@ -304,8 +304,8 @@ co_IntPaintWindows(PWINDOW_OBJECT Window, ULONG Flags, BOOL Recurse)
|
|||
/*
|
||||
* Paint child windows.
|
||||
*/
|
||||
if (!(Flags & RDW_NOCHILDREN) && !(Wnd->Style & WS_MINIMIZE) &&
|
||||
((Flags & RDW_ALLCHILDREN) || !(Wnd->Style & WS_CLIPCHILDREN)))
|
||||
if (!(Flags & RDW_NOCHILDREN) && !(Wnd->style & WS_MINIMIZE) &&
|
||||
((Flags & RDW_ALLCHILDREN) || !(Wnd->style & WS_CLIPCHILDREN)))
|
||||
{
|
||||
HWND *List, *phWnd;
|
||||
|
||||
|
@ -316,7 +316,7 @@ co_IntPaintWindows(PWINDOW_OBJECT Window, ULONG Flags, BOOL Recurse)
|
|||
{
|
||||
Window = UserGetWindowObject(*phWnd);
|
||||
Wnd = Window->Wnd;
|
||||
if (Window && (Wnd->Style & WS_VISIBLE))
|
||||
if (Window && (Wnd->style & WS_VISIBLE))
|
||||
{
|
||||
USER_REFERENCE_ENTRY Ref;
|
||||
UserRefObjectCo(Window, &Ref);
|
||||
|
@ -353,7 +353,7 @@ IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags)
|
|||
{
|
||||
HRGN hRgnClient;
|
||||
|
||||
hRgnClient = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->ClientRect);
|
||||
hRgnClient = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->rcClient);
|
||||
RgnType = NtGdiCombineRgn(hRgn, hRgn, hRgnClient, RGN_AND);
|
||||
GreDeleteObject(hRgnClient);
|
||||
}
|
||||
|
@ -362,23 +362,23 @@ IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags)
|
|||
* Clip the given region with window rectangle (or region)
|
||||
*/
|
||||
|
||||
if (!Window->WindowRegion || (Wnd->Style & WS_MINIMIZE))
|
||||
if (!Window->WindowRegion || (Wnd->style & WS_MINIMIZE))
|
||||
{
|
||||
HRGN hRgnWindow;
|
||||
|
||||
hRgnWindow = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->WindowRect);
|
||||
hRgnWindow = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->rcWindow);
|
||||
RgnType = NtGdiCombineRgn(hRgn, hRgn, hRgnWindow, RGN_AND);
|
||||
GreDeleteObject(hRgnWindow);
|
||||
}
|
||||
else
|
||||
{
|
||||
NtGdiOffsetRgn(hRgn,
|
||||
-Wnd->WindowRect.left,
|
||||
-Wnd->WindowRect.top);
|
||||
-Wnd->rcWindow.left,
|
||||
-Wnd->rcWindow.top);
|
||||
RgnType = NtGdiCombineRgn(hRgn, hRgn, Window->WindowRegion, RGN_AND);
|
||||
NtGdiOffsetRgn(hRgn,
|
||||
Wnd->WindowRect.left,
|
||||
Wnd->WindowRect.top);
|
||||
Wnd->rcWindow.left,
|
||||
Wnd->rcWindow.top);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -452,14 +452,14 @@ IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags)
|
|||
* Process children if needed
|
||||
*/
|
||||
|
||||
if (!(Flags & RDW_NOCHILDREN) && !(Wnd->Style & WS_MINIMIZE) &&
|
||||
((Flags & RDW_ALLCHILDREN) || !(Wnd->Style & WS_CLIPCHILDREN)))
|
||||
if (!(Flags & RDW_NOCHILDREN) && !(Wnd->style & WS_MINIMIZE) &&
|
||||
((Flags & RDW_ALLCHILDREN) || !(Wnd->style & WS_CLIPCHILDREN)))
|
||||
{
|
||||
PWINDOW_OBJECT Child;
|
||||
|
||||
for (Child = Window->FirstChild; Child; Child = Child->NextSibling)
|
||||
{
|
||||
if (Child->Wnd->Style & WS_VISIBLE)
|
||||
if (Child->Wnd->style & WS_VISIBLE)
|
||||
{
|
||||
/*
|
||||
* Recursive call to update children UpdateRegion
|
||||
|
@ -516,8 +516,8 @@ IntIsWindowDrawable(PWINDOW_OBJECT Window)
|
|||
for (WndObject = Window; WndObject != NULL; WndObject = WndObject->Parent)
|
||||
{
|
||||
Wnd = WndObject->Wnd;
|
||||
if (!(Wnd->Style & WS_VISIBLE) ||
|
||||
((Wnd->Style & WS_MINIMIZE) && (WndObject != Window)))
|
||||
if (!(Wnd->style & WS_VISIBLE) ||
|
||||
((Wnd->style & WS_MINIMIZE) && (WndObject != Window)))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -568,26 +568,26 @@ co_UserRedrawWindow(PWINDOW_OBJECT Window, const RECTL* UpdateRect, HRGN UpdateR
|
|||
hRgn = NULL;
|
||||
}
|
||||
else
|
||||
NtGdiOffsetRgn(hRgn, Window->Wnd->ClientRect.left, Window->Wnd->ClientRect.top);
|
||||
NtGdiOffsetRgn(hRgn, Window->Wnd->rcClient.left, Window->Wnd->rcClient.top);
|
||||
}
|
||||
else if (UpdateRect != NULL)
|
||||
{
|
||||
if (!RECTL_bIsEmptyRect(UpdateRect))
|
||||
{
|
||||
hRgn = UnsafeIntCreateRectRgnIndirect((RECTL *)UpdateRect);
|
||||
NtGdiOffsetRgn(hRgn, Window->Wnd->ClientRect.left, Window->Wnd->ClientRect.top);
|
||||
NtGdiOffsetRgn(hRgn, Window->Wnd->rcClient.left, Window->Wnd->rcClient.top);
|
||||
}
|
||||
}
|
||||
else if ((Flags & (RDW_INVALIDATE | RDW_FRAME)) == (RDW_INVALIDATE | RDW_FRAME) ||
|
||||
(Flags & (RDW_VALIDATE | RDW_NOFRAME)) == (RDW_VALIDATE | RDW_NOFRAME))
|
||||
{
|
||||
if (!RECTL_bIsEmptyRect(&Window->Wnd->WindowRect))
|
||||
hRgn = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->WindowRect);
|
||||
if (!RECTL_bIsEmptyRect(&Window->Wnd->rcWindow))
|
||||
hRgn = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->rcWindow);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!RECTL_bIsEmptyRect(&Window->Wnd->ClientRect))
|
||||
hRgn = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->ClientRect);
|
||||
if (!RECTL_bIsEmptyRect(&Window->Wnd->rcClient))
|
||||
hRgn = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->rcClient);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -629,7 +629,7 @@ BOOL FASTCALL
|
|||
IntIsWindowDirty(PWINDOW_OBJECT Window)
|
||||
{
|
||||
PWINDOW Wnd = Window->Wnd;
|
||||
return (Wnd->Style & WS_VISIBLE) &&
|
||||
return (Wnd->style & WS_VISIBLE) &&
|
||||
((Window->UpdateRegion != NULL) ||
|
||||
(Window->Flags & WINDOWOBJECT_NEED_INTERNALPAINT) ||
|
||||
(Window->Flags & WINDOWOBJECT_NEED_NCPAINT));
|
||||
|
@ -841,7 +841,7 @@ NtUserBeginPaint(HWND hWnd, PAINTSTRUCT* UnsafePs)
|
|||
}
|
||||
if (Window->UpdateRegion)
|
||||
{
|
||||
if (!(Wnd->Style & WS_CLIPCHILDREN))
|
||||
if (!(Wnd->style & WS_CLIPCHILDREN))
|
||||
{
|
||||
PWINDOW_OBJECT Child;
|
||||
for (Child = Window->FirstChild; Child; Child = Child->NextSibling)
|
||||
|
@ -937,11 +937,11 @@ co_UserGetUpdateRgn(PWINDOW_OBJECT Window, HRGN hRgn, BOOL bErase)
|
|||
}
|
||||
else
|
||||
{
|
||||
Rect = Window->Wnd->ClientRect;
|
||||
Rect = Window->Wnd->rcClient;
|
||||
IntIntersectWithParents(Window, &Rect);
|
||||
NtGdiSetRectRgn(hRgn, Rect.left, Rect.top, Rect.right, Rect.bottom);
|
||||
RegionType = NtGdiCombineRgn(hRgn, hRgn, Window->UpdateRegion, RGN_AND);
|
||||
NtGdiOffsetRgn(hRgn, -Window->Wnd->ClientRect.left, -Window->Wnd->ClientRect.top);
|
||||
NtGdiOffsetRgn(hRgn, -Window->Wnd->rcClient.left, -Window->Wnd->rcClient.top);
|
||||
}
|
||||
|
||||
if (bErase && RegionType != NULLREGION && RegionType != ERROR)
|
||||
|
@ -1021,7 +1021,7 @@ NtUserGetUpdateRect(HWND hWnd, LPRECT UnsafeRect, BOOL bErase)
|
|||
/* Get the update region bounding box. */
|
||||
if (Window->UpdateRegion == (HRGN)1)
|
||||
{
|
||||
Rect = Window->Wnd->ClientRect;
|
||||
Rect = Window->Wnd->rcClient;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1031,14 +1031,14 @@ NtUserGetUpdateRect(HWND hWnd, LPRECT UnsafeRect, BOOL bErase)
|
|||
REGION_UnlockRgn(RgnData);
|
||||
|
||||
if (RegionType != ERROR && RegionType != NULLREGION)
|
||||
RECTL_bIntersectRect(&Rect, &Rect, &Window->Wnd->ClientRect);
|
||||
RECTL_bIntersectRect(&Rect, &Rect, &Window->Wnd->rcClient);
|
||||
}
|
||||
|
||||
if (IntIntersectWithParents(Window, &Rect))
|
||||
{
|
||||
RECTL_vOffsetRect(&Rect,
|
||||
-Window->Wnd->ClientRect.left,
|
||||
-Window->Wnd->ClientRect.top);
|
||||
-Window->Wnd->rcClient.left,
|
||||
-Window->Wnd->rcClient.top);
|
||||
} else
|
||||
{
|
||||
Rect.left = Rect.top = Rect.right = Rect.bottom = 0;
|
||||
|
@ -1427,7 +1427,7 @@ NtUserScrollWindowEx(HWND hWnd, INT dx, INT dy, const RECT *prcUnsafeScroll,
|
|||
IntGetClientOrigin(Window, &ClientOrigin);
|
||||
for (Child = Window->FirstChild; Child; Child = Child->NextSibling)
|
||||
{
|
||||
rcChild = Child->Wnd->WindowRect;
|
||||
rcChild = Child->Wnd->rcWindow;
|
||||
rcChild.left -= ClientOrigin.x;
|
||||
rcChild.top -= ClientOrigin.y;
|
||||
rcChild.right -= ClientOrigin.x;
|
||||
|
@ -1513,12 +1513,12 @@ UserDrawSysMenuButton(
|
|||
|
||||
/* Get the icon to draw. We don't care about WM_GETICON here. */
|
||||
|
||||
hIcon = pWnd->Wnd->Class->hIconSm;
|
||||
hIcon = pWnd->Wnd->pcls->hIconSm;
|
||||
|
||||
if(!hIcon)
|
||||
{
|
||||
DPRINT("Wnd class has no small icon.\n");
|
||||
hIcon = pWnd->Wnd->Class->hIcon;
|
||||
hIcon = pWnd->Wnd->pcls->hIcon;
|
||||
}
|
||||
|
||||
if(!hIcon)
|
||||
|
@ -1661,7 +1661,7 @@ BOOL UserDrawCaption(
|
|||
|
||||
if ((!hIcon) && (Wnd != NULL))
|
||||
{
|
||||
HasIcon = (uFlags & DC_ICON) && (Wnd->Style & WS_SYSMENU)
|
||||
HasIcon = (uFlags & DC_ICON) && (Wnd->style & WS_SYSMENU)
|
||||
&& !(uFlags & DC_SMALLCAP) && !(Wnd->ExStyle & WS_EX_DLGMODALFRAME)
|
||||
&& !(Wnd->ExStyle & WS_EX_TOOLWINDOW);
|
||||
}
|
||||
|
@ -1740,12 +1740,12 @@ BOOL UserDrawCaption(
|
|||
|
||||
if (Wnd != NULL)
|
||||
{
|
||||
if(Wnd->Style & WS_SYSMENU)
|
||||
if(Wnd->style & WS_SYSMENU)
|
||||
{
|
||||
r.right -= 3 + ButtonWidth;
|
||||
if(!(uFlags & DC_SMALLCAP))
|
||||
{
|
||||
if(Wnd->Style & (WS_MAXIMIZEBOX | WS_MINIMIZEBOX))
|
||||
if(Wnd->style & (WS_MAXIMIZEBOX | WS_MINIMIZEBOX))
|
||||
r.right -= 2 + 2 * ButtonWidth;
|
||||
else r.right -= 2;
|
||||
r.right -= 2;
|
||||
|
@ -1833,12 +1833,12 @@ BOOL UserDrawCaption(
|
|||
ButtonWidth = UserGetSystemMetrics(SM_CXSMSIZE) - 2;
|
||||
else ButtonWidth = UserGetSystemMetrics(SM_CXSIZE) - 2;
|
||||
|
||||
if ((Wnd != NULL) && (Wnd->Style & WS_SYSMENU))
|
||||
if ((Wnd != NULL) && (Wnd->style & WS_SYSMENU))
|
||||
{
|
||||
r.right -= 3 + ButtonWidth;
|
||||
if(! (uFlags & DC_SMALLCAP))
|
||||
{
|
||||
if(Wnd->Style & (WS_MAXIMIZEBOX | WS_MINIMIZEBOX))
|
||||
if(Wnd->style & (WS_MAXIMIZEBOX | WS_MINIMIZEBOX))
|
||||
r.right -= 2 + 2 * ButtonWidth;
|
||||
else r.right -= 2;
|
||||
r.right -= 2;
|
||||
|
@ -1850,7 +1850,7 @@ BOOL UserDrawCaption(
|
|||
if (str)
|
||||
UserDrawCaptionText(hMemDc, str, &r, uFlags);
|
||||
else if (pWnd != NULL)
|
||||
UserDrawCaptionText(hMemDc, &pWnd->Wnd->WindowName, &r, uFlags);
|
||||
UserDrawCaptionText(hMemDc, &pWnd->Wnd->strName, &r, uFlags);
|
||||
}
|
||||
|
||||
if(!NtGdiBitBlt(hDc, lpRc->left, lpRc->top,
|
||||
|
|
|
@ -61,8 +61,8 @@ IntGetScrollBarRect (PWINDOW_OBJECT Window, INT nBar, RECTL *lprect)
|
|||
{
|
||||
BOOL vertical;
|
||||
PWINDOW Wnd = Window->Wnd;
|
||||
RECTL ClientRect = Window->Wnd->ClientRect;
|
||||
RECTL WindowRect = Window->Wnd->WindowRect;
|
||||
RECTL ClientRect = Window->Wnd->rcClient;
|
||||
RECTL WindowRect = Window->Wnd->rcWindow;
|
||||
|
||||
switch (nBar)
|
||||
{
|
||||
|
@ -92,7 +92,7 @@ IntGetScrollBarRect (PWINDOW_OBJECT Window, INT nBar, RECTL *lprect)
|
|||
|
||||
case SB_CTL:
|
||||
IntGetClientRect (Window, lprect);
|
||||
vertical = ((Wnd->Style & SBS_VERT) != 0);
|
||||
vertical = ((Wnd->style & SBS_VERT) != 0);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -121,7 +121,7 @@ IntCalculateThumb(PWINDOW_OBJECT Window, LONG idObject, PSCROLLBARINFO psbi, LPS
|
|||
break;
|
||||
case SB_CTL:
|
||||
IntGetClientRect(Window, &ClientRect);
|
||||
if(Wnd->Style & SBS_VERT)
|
||||
if(Wnd->style & SBS_VERT)
|
||||
{
|
||||
Thumb = UserGetSystemMetrics(SM_CYVSCROLL);
|
||||
cxy = ClientRect.bottom - ClientRect.top;
|
||||
|
@ -392,10 +392,10 @@ co_IntSetScrollInfo(PWINDOW_OBJECT Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bR
|
|||
if (bRedraw)
|
||||
{
|
||||
RECTL UpdateRect = psbi->rcScrollBar;
|
||||
UpdateRect.left -= Window->Wnd->ClientRect.left - Window->Wnd->WindowRect.left;
|
||||
UpdateRect.right -= Window->Wnd->ClientRect.left - Window->Wnd->WindowRect.left;
|
||||
UpdateRect.top -= Window->Wnd->ClientRect.top - Window->Wnd->WindowRect.top;
|
||||
UpdateRect.bottom -= Window->Wnd->ClientRect.top - Window->Wnd->WindowRect.top;
|
||||
UpdateRect.left -= Window->Wnd->rcClient.left - Window->Wnd->rcWindow.left;
|
||||
UpdateRect.right -= Window->Wnd->rcClient.left - Window->Wnd->rcWindow.left;
|
||||
UpdateRect.top -= Window->Wnd->rcClient.top - Window->Wnd->rcWindow.top;
|
||||
UpdateRect.bottom -= Window->Wnd->rcClient.top - Window->Wnd->rcWindow.top;
|
||||
co_UserRedrawWindow(Window, &UpdateRect, 0, RDW_INVALIDATE | RDW_FRAME);
|
||||
}
|
||||
|
||||
|
@ -465,8 +465,8 @@ co_IntCreateScrollBars(PWINDOW_OBJECT Window)
|
|||
RtlZeroMemory(Window->Scroll, Size);
|
||||
|
||||
Result = co_WinPosGetNonClientSize(Window,
|
||||
&Window->Wnd->WindowRect,
|
||||
&Window->Wnd->ClientRect);
|
||||
&Window->Wnd->rcWindow,
|
||||
&Window->Wnd->rcClient);
|
||||
|
||||
for(s = SB_HORZ; s <= SB_VERT; s++)
|
||||
{
|
||||
|
@ -705,7 +705,7 @@ NtUserEnableScrollBar(
|
|||
if(InfoH)
|
||||
Chg = (IntEnableScrollBar(TRUE, InfoH, wArrows) || Chg);
|
||||
|
||||
//if(Chg && (Window->Style & WS_VISIBLE))
|
||||
//if(Chg && (Window->style & WS_VISIBLE))
|
||||
/* FIXME - repaint scrollbars */
|
||||
|
||||
RETURN( TRUE);
|
||||
|
@ -867,20 +867,20 @@ co_UserShowScrollBar(PWINDOW_OBJECT Window, int wBar, DWORD bShow)
|
|||
return( TRUE);
|
||||
}
|
||||
|
||||
OldStyle = Wnd->Style;
|
||||
OldStyle = Wnd->style;
|
||||
if(bShow)
|
||||
Wnd->Style |= Style;
|
||||
Wnd->style |= Style;
|
||||
else
|
||||
Wnd->Style &= ~Style;
|
||||
Wnd->style &= ~Style;
|
||||
|
||||
if(Wnd->Style != OldStyle)
|
||||
if(Wnd->style != OldStyle)
|
||||
{
|
||||
if(Wnd->Style & WS_HSCROLL)
|
||||
if(Wnd->style & WS_HSCROLL)
|
||||
IntUpdateSBInfo(Window, SB_HORZ);
|
||||
if(Wnd->Style & WS_VSCROLL)
|
||||
if(Wnd->style & WS_VSCROLL)
|
||||
IntUpdateSBInfo(Window, SB_VERT);
|
||||
|
||||
if(Wnd->Style & WS_VISIBLE)
|
||||
if(Wnd->style & WS_VISIBLE)
|
||||
{
|
||||
/* Frame has been changed, let the window redraw itself */
|
||||
co_WinPosSetWindowPos(Window, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE |
|
||||
|
|
|
@ -252,7 +252,7 @@ NtUserCallOneParam(
|
|||
RETURN( FALSE);
|
||||
}
|
||||
|
||||
Result = (DWORD)Window->Wnd->Instance;
|
||||
Result = (DWORD)Window->Wnd->hModule;
|
||||
RETURN( Result);
|
||||
}
|
||||
|
||||
|
@ -686,7 +686,7 @@ NtUserCallHwndLock(
|
|||
PMENU_OBJECT Menu;
|
||||
DPRINT("HWNDLOCK_ROUTINE_DRAWMENUBAR\n");
|
||||
Ret = FALSE;
|
||||
if (!((Wnd->Style & (WS_CHILD | WS_POPUP)) != WS_CHILD))
|
||||
if (!((Wnd->style & (WS_CHILD | WS_POPUP)) != WS_CHILD))
|
||||
break;
|
||||
|
||||
if(!(Menu = UserGetMenuObject((HMENU) Wnd->IDMenu)))
|
||||
|
|
|
@ -43,18 +43,18 @@ VIS_ComputeVisibleRegion(
|
|||
|
||||
Wnd = Window->Wnd;
|
||||
|
||||
if (!Wnd || !(Wnd->Style & WS_VISIBLE))
|
||||
if (!Wnd || !(Wnd->style & WS_VISIBLE))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (ClientArea)
|
||||
{
|
||||
VisRgn = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->ClientRect);
|
||||
VisRgn = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->rcClient);
|
||||
}
|
||||
else
|
||||
{
|
||||
VisRgn = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->WindowRect);
|
||||
VisRgn = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->rcWindow);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -69,33 +69,33 @@ VIS_ComputeVisibleRegion(
|
|||
while (CurrentWindow)
|
||||
{
|
||||
CurrentWnd = CurrentWindow->Wnd;
|
||||
if (!(CurrentWnd) || !(CurrentWnd->Style & WS_VISIBLE))
|
||||
if (!(CurrentWnd) || !(CurrentWnd->style & WS_VISIBLE))
|
||||
{
|
||||
GreDeleteObject(VisRgn);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ClipRgn = UnsafeIntCreateRectRgnIndirect(&CurrentWnd->ClientRect);
|
||||
ClipRgn = UnsafeIntCreateRectRgnIndirect(&CurrentWnd->rcClient);
|
||||
NtGdiCombineRgn(VisRgn, VisRgn, ClipRgn, RGN_AND);
|
||||
GreDeleteObject(ClipRgn);
|
||||
|
||||
if ((PreviousWnd->Style & WS_CLIPSIBLINGS) ||
|
||||
if ((PreviousWnd->style & WS_CLIPSIBLINGS) ||
|
||||
(PreviousWnd == Wnd && ClipSiblings))
|
||||
{
|
||||
CurrentSibling = CurrentWindow->FirstChild;
|
||||
while (CurrentSibling != NULL && CurrentSibling != PreviousWindow)
|
||||
{
|
||||
CurrentSiblingWnd = CurrentSibling->Wnd;
|
||||
if ((CurrentSiblingWnd->Style & WS_VISIBLE) &&
|
||||
if ((CurrentSiblingWnd->style & WS_VISIBLE) &&
|
||||
!(CurrentSiblingWnd->ExStyle & WS_EX_TRANSPARENT))
|
||||
{
|
||||
ClipRgn = UnsafeIntCreateRectRgnIndirect(&CurrentSiblingWnd->WindowRect);
|
||||
ClipRgn = UnsafeIntCreateRectRgnIndirect(&CurrentSiblingWnd->rcWindow);
|
||||
/* Combine it with the window region if available */
|
||||
if (CurrentSibling->WindowRegion && !(CurrentSiblingWnd->Style & WS_MINIMIZE))
|
||||
if (CurrentSibling->WindowRegion && !(CurrentSiblingWnd->style & WS_MINIMIZE))
|
||||
{
|
||||
NtGdiOffsetRgn(ClipRgn, -CurrentSiblingWnd->WindowRect.left, -CurrentSiblingWnd->WindowRect.top);
|
||||
NtGdiOffsetRgn(ClipRgn, -CurrentSiblingWnd->rcWindow.left, -CurrentSiblingWnd->rcWindow.top);
|
||||
NtGdiCombineRgn(ClipRgn, ClipRgn, CurrentSibling->WindowRegion, RGN_AND);
|
||||
NtGdiOffsetRgn(ClipRgn, CurrentSiblingWnd->WindowRect.left, CurrentSiblingWnd->WindowRect.top);
|
||||
NtGdiOffsetRgn(ClipRgn, CurrentSiblingWnd->rcWindow.left, CurrentSiblingWnd->rcWindow.top);
|
||||
}
|
||||
NtGdiCombineRgn(VisRgn, VisRgn, ClipRgn, RGN_DIFF);
|
||||
GreDeleteObject(ClipRgn);
|
||||
|
@ -115,16 +115,16 @@ VIS_ComputeVisibleRegion(
|
|||
while (CurrentWindow)
|
||||
{
|
||||
CurrentWnd = CurrentWindow->Wnd;
|
||||
if ((CurrentWnd->Style & WS_VISIBLE) &&
|
||||
if ((CurrentWnd->style & WS_VISIBLE) &&
|
||||
!(CurrentWnd->ExStyle & WS_EX_TRANSPARENT))
|
||||
{
|
||||
ClipRgn = UnsafeIntCreateRectRgnIndirect(&CurrentWnd->WindowRect);
|
||||
ClipRgn = UnsafeIntCreateRectRgnIndirect(&CurrentWnd->rcWindow);
|
||||
/* Combine it with the window region if available */
|
||||
if (CurrentWindow->WindowRegion && !(CurrentWnd->Style & WS_MINIMIZE))
|
||||
if (CurrentWindow->WindowRegion && !(CurrentWnd->style & WS_MINIMIZE))
|
||||
{
|
||||
NtGdiOffsetRgn(ClipRgn, -CurrentWnd->WindowRect.left, -CurrentWnd->WindowRect.top);
|
||||
NtGdiOffsetRgn(ClipRgn, -CurrentWnd->rcWindow.left, -CurrentWnd->rcWindow.top);
|
||||
NtGdiCombineRgn(ClipRgn, ClipRgn, CurrentWindow->WindowRegion, RGN_AND);
|
||||
NtGdiOffsetRgn(ClipRgn, CurrentWnd->WindowRect.left, CurrentWnd->WindowRect.top);
|
||||
NtGdiOffsetRgn(ClipRgn, CurrentWnd->rcWindow.left, CurrentWnd->rcWindow.top);
|
||||
}
|
||||
NtGdiCombineRgn(VisRgn, VisRgn, ClipRgn, RGN_DIFF);
|
||||
GreDeleteObject(ClipRgn);
|
||||
|
@ -133,11 +133,11 @@ VIS_ComputeVisibleRegion(
|
|||
}
|
||||
}
|
||||
|
||||
if (Window->WindowRegion && !(Wnd->Style & WS_MINIMIZE))
|
||||
if (Window->WindowRegion && !(Wnd->style & WS_MINIMIZE))
|
||||
{
|
||||
NtGdiOffsetRgn(VisRgn, -Wnd->WindowRect.left, -Wnd->WindowRect.top);
|
||||
NtGdiOffsetRgn(VisRgn, -Wnd->rcWindow.left, -Wnd->rcWindow.top);
|
||||
NtGdiCombineRgn(VisRgn, VisRgn, Window->WindowRegion, RGN_AND);
|
||||
NtGdiOffsetRgn(VisRgn, Wnd->WindowRect.left, Wnd->WindowRect.top);
|
||||
NtGdiOffsetRgn(VisRgn, Wnd->rcWindow.left, Wnd->rcWindow.top);
|
||||
}
|
||||
|
||||
return VisRgn;
|
||||
|
@ -165,8 +165,8 @@ co_VIS_WindowLayoutChanged(
|
|||
{
|
||||
ParentWnd = Parent->Wnd;
|
||||
NtGdiOffsetRgn(Temp,
|
||||
Wnd->WindowRect.left - ParentWnd->ClientRect.left,
|
||||
Wnd->WindowRect.top - ParentWnd->ClientRect.top);
|
||||
Wnd->rcWindow.left - ParentWnd->rcClient.left,
|
||||
Wnd->rcWindow.top - ParentWnd->rcClient.top);
|
||||
|
||||
UserRefObjectCo(Parent, &Ref);
|
||||
co_UserRedrawWindow(Parent, NULL, Temp,
|
||||
|
|
|
@ -125,8 +125,8 @@ DceAllocDCE(PWINDOW_OBJECT Window OPTIONAL, DCE_TYPE Type)
|
|||
{
|
||||
if (Type == DCE_WINDOW_DC)
|
||||
{
|
||||
if (Wnd->Style & WS_CLIPCHILDREN) pDce->DCXFlags |= DCX_CLIPCHILDREN;
|
||||
if (Wnd->Style & WS_CLIPSIBLINGS) pDce->DCXFlags |= DCX_CLIPSIBLINGS;
|
||||
if (Wnd->style & WS_CLIPCHILDREN) pDce->DCXFlags |= DCX_CLIPCHILDREN;
|
||||
if (Wnd->style & WS_CLIPSIBLINGS) pDce->DCXFlags |= DCX_CLIPSIBLINGS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -152,13 +152,13 @@ DceSetDrawable(PWINDOW_OBJECT Window OPTIONAL, HDC hDC, ULONG Flags,
|
|||
Wnd = Window->Wnd;
|
||||
if (Flags & DCX_WINDOW)
|
||||
{
|
||||
dc->ptlDCOrig.x = Wnd->WindowRect.left;
|
||||
dc->ptlDCOrig.y = Wnd->WindowRect.top;
|
||||
dc->ptlDCOrig.x = Wnd->rcWindow.left;
|
||||
dc->ptlDCOrig.y = Wnd->rcWindow.top;
|
||||
}
|
||||
else
|
||||
{
|
||||
dc->ptlDCOrig.x = Wnd->ClientRect.left;
|
||||
dc->ptlDCOrig.y = Wnd->ClientRect.top;
|
||||
dc->ptlDCOrig.x = Wnd->rcClient.left;
|
||||
dc->ptlDCOrig.y = Wnd->rcClient.top;
|
||||
}
|
||||
}
|
||||
DC_UnlockDc(dc);
|
||||
|
@ -251,7 +251,7 @@ DceUpdateVisRgn(DCE *Dce, PWINDOW_OBJECT Window, ULONG Flags)
|
|||
|
||||
ParentWnd = Parent->Wnd;
|
||||
|
||||
if (ParentWnd->Style & WS_CLIPSIBLINGS)
|
||||
if (ParentWnd->style & WS_CLIPSIBLINGS)
|
||||
{
|
||||
DcxFlags = DCX_CLIPSIBLINGS |
|
||||
(Flags & ~(DCX_CLIPCHILDREN | DCX_WINDOW));
|
||||
|
@ -267,7 +267,7 @@ DceUpdateVisRgn(DCE *Dce, PWINDOW_OBJECT Window, ULONG Flags)
|
|||
DesktopWindow = UserGetWindowObject(IntGetDesktopWindow());
|
||||
if (NULL != DesktopWindow)
|
||||
{
|
||||
hRgnVisible = UnsafeIntCreateRectRgnIndirect(&DesktopWindow->Wnd->WindowRect);
|
||||
hRgnVisible = UnsafeIntCreateRectRgnIndirect(&DesktopWindow->Wnd->rcWindow);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -342,20 +342,20 @@ UserGetDCEx(PWINDOW_OBJECT Window OPTIONAL, HANDLE ClipRegion, ULONG Flags)
|
|||
Flags &= ~(DCX_CLIPCHILDREN | DCX_CLIPSIBLINGS | DCX_PARENTCLIP);
|
||||
if (!(Flags & DCX_WINDOW)) // not window rectangle
|
||||
{
|
||||
if (Wnd->Class->Style & CS_PARENTDC)
|
||||
if (Wnd->pcls->Style & CS_PARENTDC)
|
||||
{
|
||||
Flags |= DCX_PARENTCLIP;
|
||||
}
|
||||
|
||||
if (!(Flags & DCX_CACHE) && // Not on the cheap wine list.
|
||||
!(Wnd->Class->Style & CS_OWNDC) )
|
||||
!(Wnd->pcls->Style & CS_OWNDC) )
|
||||
{
|
||||
if (!(Wnd->Class->Style & CS_CLASSDC))
|
||||
if (!(Wnd->pcls->Style & CS_CLASSDC))
|
||||
// The window is not POWNED or has any CLASS, so we are looking for cheap wine.
|
||||
Flags |= DCX_CACHE;
|
||||
else
|
||||
{
|
||||
if (Wnd->Class->Dce) hDC = ((PDCE)Wnd->Class->Dce)->hDC;
|
||||
if (Wnd->pcls->Dce) hDC = ((PDCE)Wnd->pcls->Dce)->hDC;
|
||||
DPRINT("We have CLASS!!\n");
|
||||
}
|
||||
}
|
||||
|
@ -365,20 +365,20 @@ UserGetDCEx(PWINDOW_OBJECT Window OPTIONAL, HANDLE ClipRegion, ULONG Flags)
|
|||
if (Window->Dce) DPRINT1("We have POWNER with DCE!!\n");
|
||||
}
|
||||
*/
|
||||
if (Wnd->Style & WS_CLIPSIBLINGS)
|
||||
if (Wnd->style & WS_CLIPSIBLINGS)
|
||||
{
|
||||
Flags |= DCX_CLIPSIBLINGS;
|
||||
}
|
||||
|
||||
if (Wnd->Style & WS_CLIPCHILDREN &&
|
||||
!(Wnd->Style & WS_MINIMIZE))
|
||||
if (Wnd->style & WS_CLIPCHILDREN &&
|
||||
!(Wnd->style & WS_MINIMIZE))
|
||||
{
|
||||
Flags |= DCX_CLIPCHILDREN;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Wnd->Style & WS_CLIPSIBLINGS) Flags |= DCX_CLIPSIBLINGS;
|
||||
if (Wnd->style & WS_CLIPSIBLINGS) Flags |= DCX_CLIPSIBLINGS;
|
||||
Flags |= DCX_CACHE;
|
||||
}
|
||||
}
|
||||
|
@ -393,7 +393,7 @@ UserGetDCEx(PWINDOW_OBJECT Window OPTIONAL, HANDLE ClipRegion, ULONG Flags)
|
|||
|
||||
Parent = (Window ? Window->Parent : NULL);
|
||||
|
||||
if (NULL == Window || !(Wnd->Style & WS_CHILD) || NULL == Parent)
|
||||
if (NULL == Window || !(Wnd->style & WS_CHILD) || NULL == Parent)
|
||||
{
|
||||
Flags &= ~DCX_PARENTCLIP;
|
||||
Flags |= DCX_CLIPSIBLINGS;
|
||||
|
@ -404,11 +404,11 @@ UserGetDCEx(PWINDOW_OBJECT Window OPTIONAL, HANDLE ClipRegion, ULONG Flags)
|
|||
|
||||
if (Flags & DCX_PARENTCLIP)
|
||||
{
|
||||
if ((Wnd->Style & WS_VISIBLE) &&
|
||||
(Parent->Wnd->Style & WS_VISIBLE))
|
||||
if ((Wnd->style & WS_VISIBLE) &&
|
||||
(Parent->Wnd->style & WS_VISIBLE))
|
||||
{
|
||||
Flags &= ~DCX_CLIPCHILDREN;
|
||||
if (Parent->Wnd->Style & WS_CLIPSIBLINGS)
|
||||
if (Parent->Wnd->style & WS_CLIPSIBLINGS)
|
||||
{
|
||||
Flags |= DCX_CLIPSIBLINGS;
|
||||
}
|
||||
|
@ -543,11 +543,11 @@ UserGetDCEx(PWINDOW_OBJECT Window OPTIONAL, HANDLE ClipRegion, ULONG Flags)
|
|||
{
|
||||
if (!(Flags & DCX_WINDOW))
|
||||
{
|
||||
Dce->hClipRgn = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->ClientRect);
|
||||
Dce->hClipRgn = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->rcClient);
|
||||
}
|
||||
else
|
||||
{
|
||||
Dce->hClipRgn = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->WindowRect);
|
||||
Dce->hClipRgn = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->rcWindow);
|
||||
}
|
||||
Dce->DCXFlags &= ~DCX_KEEPCLIPRGN;
|
||||
}
|
||||
|
@ -646,8 +646,8 @@ DceFreeWindowDCE(PWINDOW_OBJECT Window)
|
|||
{
|
||||
if (!(pDCE->DCXFlags & DCX_CACHE)) /* owned or Class DCE*/
|
||||
{
|
||||
if (Window->Wnd->Class->Style & CS_CLASSDC ||
|
||||
Window->Wnd->Style & CS_CLASSDC) /* Test Class first */
|
||||
if (Window->Wnd->pcls->Style & CS_CLASSDC ||
|
||||
Window->Wnd->style & CS_CLASSDC) /* Test Class first */
|
||||
{
|
||||
if (pDCE->DCXFlags & (DCX_INTERSECTRGN | DCX_EXCLUDERGN)) /* Class DCE*/
|
||||
DceDeleteClipRgn(pDCE);
|
||||
|
@ -657,8 +657,8 @@ DceFreeWindowDCE(PWINDOW_OBJECT Window)
|
|||
pDCE->DCXFlags = DCX_DCEEMPTY;
|
||||
pDCE->hwndCurrent = 0;
|
||||
}
|
||||
else if (Window->Wnd->Class->Style & CS_OWNDC ||
|
||||
Window->Wnd->Style & CS_OWNDC) /* owned DCE*/
|
||||
else if (Window->Wnd->pcls->Style & CS_OWNDC ||
|
||||
Window->Wnd->style & CS_OWNDC) /* owned DCE*/
|
||||
{
|
||||
pDCE = DceFreeDCE(pDCE, FALSE);
|
||||
if (!pDCE) break;
|
||||
|
@ -771,17 +771,17 @@ DceResetActiveDCEs(PWINDOW_OBJECT Window)
|
|||
{
|
||||
if (pDCE->DCXFlags & DCX_WINDOW)
|
||||
{
|
||||
DeltaX = CurrentWindow->Wnd->WindowRect.left - dc->ptlDCOrig.x;
|
||||
DeltaY = CurrentWindow->Wnd->WindowRect.top - dc->ptlDCOrig.y;
|
||||
dc->ptlDCOrig.x = CurrentWindow->Wnd->WindowRect.left;
|
||||
dc->ptlDCOrig.y = CurrentWindow->Wnd->WindowRect.top;
|
||||
DeltaX = CurrentWindow->Wnd->rcWindow.left - dc->ptlDCOrig.x;
|
||||
DeltaY = CurrentWindow->Wnd->rcWindow.top - dc->ptlDCOrig.y;
|
||||
dc->ptlDCOrig.x = CurrentWindow->Wnd->rcWindow.left;
|
||||
dc->ptlDCOrig.y = CurrentWindow->Wnd->rcWindow.top;
|
||||
}
|
||||
else
|
||||
{
|
||||
DeltaX = CurrentWindow->Wnd->ClientRect.left - dc->ptlDCOrig.x;
|
||||
DeltaY = CurrentWindow->Wnd->ClientRect.top - dc->ptlDCOrig.y;
|
||||
dc->ptlDCOrig.x = CurrentWindow->Wnd->ClientRect.left;
|
||||
dc->ptlDCOrig.y = CurrentWindow->Wnd->ClientRect.top;
|
||||
DeltaX = CurrentWindow->Wnd->rcClient.left - dc->ptlDCOrig.x;
|
||||
DeltaY = CurrentWindow->Wnd->rcClient.top - dc->ptlDCOrig.y;
|
||||
dc->ptlDCOrig.x = CurrentWindow->Wnd->rcClient.left;
|
||||
dc->ptlDCOrig.y = CurrentWindow->Wnd->rcClient.top;
|
||||
}
|
||||
if (NULL != dc->rosdc.hClipRgn)
|
||||
{
|
||||
|
|
|
@ -174,11 +174,11 @@ IntGetParent(PWINDOW_OBJECT Wnd)
|
|||
{
|
||||
if (!Wnd->Wnd) return NULL;
|
||||
|
||||
if (Wnd->Wnd->Style & WS_POPUP)
|
||||
if (Wnd->Wnd->style & WS_POPUP)
|
||||
{
|
||||
return UserGetWindowObject(Wnd->hOwner);
|
||||
}
|
||||
else if (Wnd->Wnd->Style & WS_CHILD)
|
||||
else if (Wnd->Wnd->style & WS_CHILD)
|
||||
{
|
||||
return Wnd->Parent;
|
||||
}
|
||||
|
@ -325,13 +325,13 @@ UserFreeWindowInfo(PW32THREADINFO ti, PWINDOW_OBJECT WindowObject)
|
|||
ClientInfo->CallbackWnd.pvWnd = NULL;
|
||||
}
|
||||
|
||||
if (Wnd->WindowName.Buffer != NULL)
|
||||
if (Wnd->strName.Buffer != NULL)
|
||||
{
|
||||
Wnd->WindowName.Length = 0;
|
||||
Wnd->WindowName.MaximumLength = 0;
|
||||
Wnd->strName.Length = 0;
|
||||
Wnd->strName.MaximumLength = 0;
|
||||
DesktopHeapFree(Wnd->pdesktop,
|
||||
Wnd->WindowName.Buffer);
|
||||
Wnd->WindowName.Buffer = NULL;
|
||||
Wnd->strName.Buffer);
|
||||
Wnd->strName.Buffer = NULL;
|
||||
}
|
||||
|
||||
DesktopHeapFree(Wnd->pdesktop, Wnd);
|
||||
|
@ -369,7 +369,7 @@ static LRESULT co_UserFreeWindow(PWINDOW_OBJECT Window,
|
|||
return 0;
|
||||
}
|
||||
Window->Status |= WINDOWSTATUS_DESTROYING;
|
||||
Wnd->Style &= ~WS_VISIBLE;
|
||||
Wnd->style &= ~WS_VISIBLE;
|
||||
/* remove the window already at this point from the thread window list so we
|
||||
don't get into trouble when destroying the thread windows while we're still
|
||||
in IntDestroyWindow() */
|
||||
|
@ -457,7 +457,7 @@ static LRESULT co_UserFreeWindow(PWINDOW_OBJECT Window,
|
|||
TIMER_RemoveWindowTimers(Window->hSelf);
|
||||
#endif
|
||||
|
||||
if (!(Wnd->Style & WS_CHILD) && Wnd->IDMenu
|
||||
if (!(Wnd->style & WS_CHILD) && Wnd->IDMenu
|
||||
&& (Menu = UserGetMenuObject((HMENU)Wnd->IDMenu)))
|
||||
{
|
||||
IntDestroyMenuObject(Menu, TRUE, TRUE);
|
||||
|
@ -486,10 +486,10 @@ static LRESULT co_UserFreeWindow(PWINDOW_OBJECT Window,
|
|||
IntDestroyScrollBars(Window);
|
||||
|
||||
/* dereference the class */
|
||||
IntDereferenceClass(Wnd->Class,
|
||||
IntDereferenceClass(Wnd->pcls,
|
||||
Window->ti->pDeskInfo,
|
||||
Window->ti->ppi);
|
||||
Wnd->Class = NULL;
|
||||
Wnd->pcls = NULL;
|
||||
|
||||
if(Window->WindowRegion)
|
||||
{
|
||||
|
@ -510,19 +510,19 @@ VOID FASTCALL
|
|||
IntGetWindowBorderMeasures(PWINDOW_OBJECT Window, UINT *cx, UINT *cy)
|
||||
{
|
||||
PWINDOW Wnd = Window->Wnd;
|
||||
if(HAS_DLGFRAME(Wnd->Style, Wnd->ExStyle) && !(Wnd->Style & WS_MINIMIZE))
|
||||
if(HAS_DLGFRAME(Wnd->style, Wnd->ExStyle) && !(Wnd->style & WS_MINIMIZE))
|
||||
{
|
||||
*cx = UserGetSystemMetrics(SM_CXDLGFRAME);
|
||||
*cy = UserGetSystemMetrics(SM_CYDLGFRAME);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(HAS_THICKFRAME(Wnd->Style, Wnd->ExStyle)&& !(Wnd->Style & WS_MINIMIZE))
|
||||
if(HAS_THICKFRAME(Wnd->style, Wnd->ExStyle)&& !(Wnd->style & WS_MINIMIZE))
|
||||
{
|
||||
*cx = UserGetSystemMetrics(SM_CXFRAME);
|
||||
*cy = UserGetSystemMetrics(SM_CYFRAME);
|
||||
}
|
||||
else if(HAS_THINFRAME(Wnd->Style, Wnd->ExStyle))
|
||||
else if(HAS_THINFRAME(Wnd->style, Wnd->ExStyle))
|
||||
{
|
||||
*cx = UserGetSystemMetrics(SM_CXBORDER);
|
||||
*cy = UserGetSystemMetrics(SM_CYBORDER);
|
||||
|
@ -544,13 +544,13 @@ IntGetWindowProc(IN PWINDOW_OBJECT Window,
|
|||
|
||||
if (Wnd->IsSystem)
|
||||
{
|
||||
return (Ansi ? Wnd->WndProcExtra : Wnd->WndProc);
|
||||
return (Ansi ? Wnd->WndProcExtra : Wnd->lpfnWndProc);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!Ansi == Wnd->Unicode)
|
||||
{
|
||||
return Wnd->WndProc;
|
||||
return Wnd->lpfnWndProc;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -564,13 +564,13 @@ IntGetWindowProc(IN PWINDOW_OBJECT Window,
|
|||
{
|
||||
PCALLPROC NewCallProc, CallProc;
|
||||
|
||||
NewCallProc = UserFindCallProc(Wnd->Class,
|
||||
Wnd->WndProc,
|
||||
NewCallProc = UserFindCallProc(Wnd->pcls,
|
||||
Wnd->lpfnWndProc,
|
||||
Wnd->Unicode);
|
||||
if (NewCallProc == NULL)
|
||||
{
|
||||
NewCallProc = CreateCallProc(Wnd->ti->pDeskInfo,
|
||||
Wnd->WndProc,
|
||||
Wnd->lpfnWndProc,
|
||||
Wnd->Unicode,
|
||||
Wnd->ti->ppi);
|
||||
if (NewCallProc == NULL)
|
||||
|
@ -579,7 +579,7 @@ IntGetWindowProc(IN PWINDOW_OBJECT Window,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
UserAddCallProcToClass(Wnd->Class,
|
||||
UserAddCallProcToClass(Wnd->pcls,
|
||||
NewCallProc);
|
||||
}
|
||||
|
||||
|
@ -598,13 +598,13 @@ IntGetWindowInfo(PWINDOW_OBJECT Window, PWINDOWINFO pwi)
|
|||
PWINDOW Wnd = Window->Wnd;
|
||||
|
||||
pwi->cbSize = sizeof(WINDOWINFO);
|
||||
pwi->rcWindow = Window->Wnd->WindowRect;
|
||||
pwi->rcClient = Window->Wnd->ClientRect;
|
||||
pwi->dwStyle = Wnd->Style;
|
||||
pwi->rcWindow = Window->Wnd->rcWindow;
|
||||
pwi->rcClient = Window->Wnd->rcClient;
|
||||
pwi->dwStyle = Wnd->style;
|
||||
pwi->dwExStyle = Wnd->ExStyle;
|
||||
pwi->dwWindowStatus = (UserGetForegroundWindow() == Window->hSelf); /* WS_ACTIVECAPTION */
|
||||
IntGetWindowBorderMeasures(Window, &pwi->cxWindowBorders, &pwi->cyWindowBorders);
|
||||
pwi->atomWindowType = (Wnd->Class ? Wnd->Class->Atom : 0);
|
||||
pwi->atomWindowType = (Wnd->pcls ? Wnd->pcls->Atom : 0);
|
||||
pwi->wCreatorVersion = 0x400; /* FIXME - return a real version number */
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -618,7 +618,7 @@ IntSetMenu(
|
|||
PMENU_OBJECT OldMenu, NewMenu = NULL;
|
||||
PWINDOW Wnd = Window->Wnd;
|
||||
|
||||
if ((Wnd->Style & (WS_CHILD | WS_POPUP)) == WS_CHILD)
|
||||
if ((Wnd->style & (WS_CHILD | WS_POPUP)) == WS_CHILD)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
|
||||
return FALSE;
|
||||
|
@ -733,8 +733,8 @@ IntGetClientRect(PWINDOW_OBJECT Window, RECTL *Rect)
|
|||
ASSERT( Rect );
|
||||
|
||||
Rect->left = Rect->top = 0;
|
||||
Rect->right = Window->Wnd->ClientRect.right - Window->Wnd->ClientRect.left;
|
||||
Rect->bottom = Window->Wnd->ClientRect.bottom - Window->Wnd->ClientRect.top;
|
||||
Rect->right = Window->Wnd->rcClient.right - Window->Wnd->rcClient.left;
|
||||
Rect->bottom = Window->Wnd->rcClient.bottom - Window->Wnd->rcClient.top;
|
||||
}
|
||||
|
||||
|
||||
|
@ -880,7 +880,7 @@ IntIsChildWindow(PWINDOW_OBJECT Parent, PWINDOW_OBJECT BaseWindow)
|
|||
{
|
||||
return(TRUE);
|
||||
}
|
||||
if(!(Wnd->Style & WS_CHILD))
|
||||
if(!(Wnd->style & WS_CHILD))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -901,11 +901,11 @@ IntIsWindowVisible(PWINDOW_OBJECT BaseWindow)
|
|||
while(Window)
|
||||
{
|
||||
Wnd = Window->Wnd;
|
||||
if(!(Wnd->Style & WS_CHILD))
|
||||
if(!(Wnd->style & WS_CHILD))
|
||||
{
|
||||
break;
|
||||
}
|
||||
if(!(Wnd->Style & WS_VISIBLE))
|
||||
if(!(Wnd->style & WS_VISIBLE))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -913,7 +913,7 @@ IntIsWindowVisible(PWINDOW_OBJECT BaseWindow)
|
|||
Window = Window->Parent;
|
||||
}
|
||||
|
||||
if(Window && Wnd->Style & WS_VISIBLE)
|
||||
if(Window && Wnd->style & WS_VISIBLE)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -933,7 +933,7 @@ IntLinkWindow(
|
|||
PWINDOW_OBJECT Parent;
|
||||
|
||||
Wnd->Parent = WndParent;
|
||||
Wnd->Wnd->Parent = WndParent ? WndParent->Wnd : NULL;
|
||||
Wnd->Wnd->spwndParent = WndParent ? WndParent->Wnd : NULL;
|
||||
if ((Wnd->PrevSibling = WndPrevSibling))
|
||||
{
|
||||
/* link after WndPrevSibling */
|
||||
|
@ -990,12 +990,12 @@ IntSetOwner(HWND hWnd, HWND hWndNewOwner)
|
|||
if((WndNewOwner = UserGetWindowObject(hWndNewOwner)))
|
||||
{
|
||||
Wnd->hOwner = hWndNewOwner;
|
||||
Wnd->Wnd->Owner = WndNewOwner->Wnd;
|
||||
Wnd->Wnd->spwndOwner = WndNewOwner->Wnd;
|
||||
}
|
||||
else
|
||||
{
|
||||
Wnd->hOwner = NULL;
|
||||
Wnd->Wnd->Owner = NULL;
|
||||
Wnd->Wnd->spwndOwner = NULL;
|
||||
}
|
||||
|
||||
UserDereferenceObject(Wnd);
|
||||
|
@ -1140,7 +1140,7 @@ IntUnlinkWindow(PWINDOW_OBJECT Wnd)
|
|||
|
||||
Wnd->PrevSibling = Wnd->NextSibling = Wnd->Parent = NULL;
|
||||
if (Wnd->Wnd)
|
||||
Wnd->Wnd->Parent = NULL;
|
||||
Wnd->Wnd->spwndParent = NULL;
|
||||
}
|
||||
|
||||
BOOL FASTCALL
|
||||
|
@ -1155,7 +1155,7 @@ IntAnyPopup(VOID)
|
|||
|
||||
for(Child = Window->FirstChild; Child; Child = Child->NextSibling)
|
||||
{
|
||||
if(Child->hOwner && Child->Wnd->Style & WS_VISIBLE)
|
||||
if(Child->hOwner && Child->Wnd->style & WS_VISIBLE)
|
||||
{
|
||||
/*
|
||||
* The desktop has a popup window if one of them has
|
||||
|
@ -1191,28 +1191,28 @@ IntGetWindowPlacement(PWINDOW_OBJECT Window, WINDOWPLACEMENT *lpwndpl)
|
|||
}
|
||||
|
||||
lpwndpl->flags = 0;
|
||||
if (0 == (Wnd->Style & WS_VISIBLE))
|
||||
if (0 == (Wnd->style & WS_VISIBLE))
|
||||
{
|
||||
lpwndpl->showCmd = SW_HIDE;
|
||||
}
|
||||
else if (0 != (Window->Flags & WINDOWOBJECT_RESTOREMAX) ||
|
||||
0 != (Wnd->Style & WS_MAXIMIZE))
|
||||
0 != (Wnd->style & WS_MAXIMIZE))
|
||||
{
|
||||
lpwndpl->showCmd = SW_MAXIMIZE;
|
||||
}
|
||||
else if (0 != (Wnd->Style & WS_MINIMIZE))
|
||||
else if (0 != (Wnd->style & WS_MINIMIZE))
|
||||
{
|
||||
lpwndpl->showCmd = SW_MINIMIZE;
|
||||
}
|
||||
else if (0 != (Wnd->Style & WS_VISIBLE))
|
||||
else if (0 != (Wnd->style & WS_VISIBLE))
|
||||
{
|
||||
lpwndpl->showCmd = SW_SHOWNORMAL;
|
||||
}
|
||||
|
||||
Size.x = Wnd->WindowRect.left;
|
||||
Size.y = Wnd->WindowRect.top;
|
||||
Size.x = Wnd->rcWindow.left;
|
||||
Size.y = Wnd->rcWindow.top;
|
||||
WinPosInitInternalPos(Window, &Size,
|
||||
&Wnd->WindowRect);
|
||||
&Wnd->rcWindow);
|
||||
|
||||
lpwndpl->rcNormalPosition = Wnd->InternalPos.NormalRect;
|
||||
lpwndpl->ptMinPosition = Wnd->InternalPos.IconPos;
|
||||
|
@ -1423,8 +1423,8 @@ NtUserChildWindowFromPointEx(HWND hwndParent,
|
|||
|
||||
if(Parent->hSelf != IntGetDesktopWindow())
|
||||
{
|
||||
Pt.x += Parent->Wnd->ClientRect.left;
|
||||
Pt.y += Parent->Wnd->ClientRect.top;
|
||||
Pt.x += Parent->Wnd->rcClient.left;
|
||||
Pt.y += Parent->Wnd->rcClient.top;
|
||||
}
|
||||
|
||||
if(!IntPtInWindow(Parent, Pt.x, Pt.y))
|
||||
|
@ -1442,11 +1442,11 @@ NtUserChildWindowFromPointEx(HWND hwndParent,
|
|||
if((Child = UserGetWindowObject(*phWnd)))
|
||||
{
|
||||
ChildWnd = Child->Wnd;
|
||||
if(!(ChildWnd->Style & WS_VISIBLE) && (uiFlags & CWP_SKIPINVISIBLE))
|
||||
if(!(ChildWnd->style & WS_VISIBLE) && (uiFlags & CWP_SKIPINVISIBLE))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if((ChildWnd->Style & WS_DISABLED) && (uiFlags & CWP_SKIPDISABLED))
|
||||
if((ChildWnd->style & WS_DISABLED) && (uiFlags & CWP_SKIPDISABLED))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -1479,7 +1479,7 @@ IntCalcDefPosSize(PWINDOW_OBJECT Parent, PWINDOW_OBJECT Window, RECTL *rc, BOOL
|
|||
|
||||
if(Parent != NULL)
|
||||
{
|
||||
RECTL_bIntersectRect(rc, rc, &Parent->Wnd->ClientRect);
|
||||
RECTL_bIntersectRect(rc, rc, &Parent->Wnd->rcClient);
|
||||
|
||||
if(IncPos)
|
||||
{
|
||||
|
@ -1702,41 +1702,41 @@ AllocErr:
|
|||
* Fill out the structure describing it.
|
||||
*/
|
||||
Window->ti = ti;
|
||||
Wnd->Class = Class;
|
||||
Wnd->pcls = Class;
|
||||
Class = NULL;
|
||||
|
||||
Window->SystemMenu = (HMENU)0;
|
||||
Wnd->ContextHelpId = 0;
|
||||
Wnd->IDMenu = 0;
|
||||
Wnd->Instance = hInstance;
|
||||
Wnd->hModule = hInstance;
|
||||
Window->hSelf = hWnd;
|
||||
|
||||
Window->MessageQueue = pti->MessageQueue;
|
||||
IntReferenceMessageQueue(Window->MessageQueue);
|
||||
Window->Parent = ParentWindow;
|
||||
Wnd->Parent = ParentWindow ? ParentWindow->Wnd : NULL;
|
||||
if (Wnd->Parent != NULL && hWndParent != 0)
|
||||
Wnd->spwndParent = ParentWindow ? ParentWindow->Wnd : NULL;
|
||||
if (Wnd->spwndParent != NULL && hWndParent != 0)
|
||||
{
|
||||
Wnd->HideFocus = Wnd->Parent->HideFocus;
|
||||
Wnd->HideAccel = Wnd->Parent->HideAccel;
|
||||
Wnd->HideFocus = Wnd->spwndParent->HideFocus;
|
||||
Wnd->HideAccel = Wnd->spwndParent->HideAccel;
|
||||
}
|
||||
|
||||
if((OwnerWindow = UserGetWindowObject(OwnerWindowHandle)))
|
||||
{
|
||||
Window->hOwner = OwnerWindowHandle;
|
||||
Wnd->Owner = OwnerWindow->Wnd;
|
||||
Wnd->spwndOwner = OwnerWindow->Wnd;
|
||||
HasOwner = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
Window->hOwner = NULL;
|
||||
Wnd->Owner = NULL;
|
||||
Wnd->spwndOwner = NULL;
|
||||
HasOwner = FALSE;
|
||||
}
|
||||
|
||||
Wnd->UserData = 0;
|
||||
Wnd->dwUserData = 0;
|
||||
|
||||
Wnd->IsSystem = Wnd->Class->System;
|
||||
Wnd->IsSystem = Wnd->pcls->System;
|
||||
|
||||
/* BugBoy Comments: Comment below say that System classes are always created as UNICODE.
|
||||
In windows, creating a window with the ANSI version of CreateWindow sets the window
|
||||
|
@ -1745,17 +1745,17 @@ AllocErr:
|
|||
No where can I see in code or through testing does the window change back to ANSI
|
||||
after being created as UNICODE in ROS. I didnt do more testing to see what problems this would cause.*/
|
||||
// See NtUserDefSetText! We convert to Unicode all the time and never use Mix. (jt)
|
||||
if (Wnd->Class->System)
|
||||
if (Wnd->pcls->System)
|
||||
{
|
||||
/* NOTE: Always create a unicode window for system classes! */
|
||||
Wnd->Unicode = TRUE;
|
||||
Wnd->WndProc = Wnd->Class->WndProc;
|
||||
Wnd->WndProcExtra = Wnd->Class->WndProcExtra;
|
||||
Wnd->lpfnWndProc = Wnd->pcls->WndProc;
|
||||
Wnd->WndProcExtra = Wnd->pcls->WndProcExtra;
|
||||
}
|
||||
else
|
||||
{
|
||||
Wnd->Unicode = Wnd->Class->Unicode;
|
||||
Wnd->WndProc = Wnd->Class->WndProc;
|
||||
Wnd->Unicode = Wnd->pcls->Unicode;
|
||||
Wnd->lpfnWndProc = Wnd->pcls->WndProc;
|
||||
Wnd->CallProc = NULL;
|
||||
}
|
||||
|
||||
|
@ -1764,33 +1764,33 @@ AllocErr:
|
|||
Window->LastChild = NULL;
|
||||
Window->PrevSibling = NULL;
|
||||
Window->NextSibling = NULL;
|
||||
Wnd->ExtraDataSize = Wnd->Class->WndExtra;
|
||||
Wnd->cbwndExtra = Wnd->pcls->WndExtra;
|
||||
|
||||
InitializeListHead(&Wnd->PropListHead);
|
||||
InitializeListHead(&Window->WndObjListHead);
|
||||
|
||||
if ( NULL != WindowName->Buffer && WindowName->Length > 0 )
|
||||
{
|
||||
Wnd->WindowName.Buffer = DesktopHeapAlloc(Wnd->pdesktop,
|
||||
Wnd->strName.Buffer = DesktopHeapAlloc(Wnd->pdesktop,
|
||||
WindowName->Length + sizeof(UNICODE_NULL));
|
||||
if (Wnd->WindowName.Buffer == NULL)
|
||||
if (Wnd->strName.Buffer == NULL)
|
||||
{
|
||||
SetLastNtError(STATUS_INSUFFICIENT_RESOURCES);
|
||||
RETURN( (PWINDOW)0);
|
||||
}
|
||||
|
||||
Wnd->WindowName.Buffer[WindowName->Length / sizeof(WCHAR)] = L'\0';
|
||||
Wnd->strName.Buffer[WindowName->Length / sizeof(WCHAR)] = L'\0';
|
||||
_SEH2_TRY
|
||||
{
|
||||
RtlCopyMemory(Wnd->WindowName.Buffer,
|
||||
RtlCopyMemory(Wnd->strName.Buffer,
|
||||
WindowName->Buffer,
|
||||
WindowName->Length);
|
||||
Wnd->WindowName.Length = WindowName->Length;
|
||||
Wnd->strName.Length = WindowName->Length;
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
WindowName->Length = 0;
|
||||
Wnd->WindowName.Buffer[0] = L'\0';
|
||||
Wnd->strName.Buffer[0] = L'\0';
|
||||
}
|
||||
_SEH2_END;
|
||||
}
|
||||
|
@ -1837,7 +1837,7 @@ AllocErr:
|
|||
IntSetMenu(Window, hMenu, &MenuChanged);
|
||||
else
|
||||
{
|
||||
hMenu = Wnd->Class->hMenu;
|
||||
hMenu = Wnd->pcls->hMenu;
|
||||
if (hMenu) IntSetMenu(Window, hMenu, &MenuChanged);
|
||||
}
|
||||
}
|
||||
|
@ -1848,10 +1848,10 @@ AllocErr:
|
|||
InsertTailList (&pti->WindowListHead, &Window->ThreadListEntry);
|
||||
|
||||
/* Handle "CS_CLASSDC", it is tested first. */
|
||||
if ((Wnd->Class->Style & CS_CLASSDC) && !(Wnd->Class->Dce)) // One DCE per class to have CLASS.
|
||||
Wnd->Class->Dce = DceAllocDCE(Window, DCE_CLASS_DC);
|
||||
if ((Wnd->pcls->Style & CS_CLASSDC) && !(Wnd->pcls->Dce)) // One DCE per class to have CLASS.
|
||||
Wnd->pcls->Dce = DceAllocDCE(Window, DCE_CLASS_DC);
|
||||
/* Allocate a DCE for this window. */
|
||||
else if ( Wnd->Class->Style & CS_OWNDC)
|
||||
else if ( Wnd->pcls->Style & CS_OWNDC)
|
||||
Window->Dce = DceAllocDCE(Window, DCE_WINDOW_DC);
|
||||
|
||||
Pos.x = x;
|
||||
|
@ -1860,7 +1860,7 @@ AllocErr:
|
|||
Size.cy = nHeight;
|
||||
|
||||
Wnd->ExStyle = dwExStyle;
|
||||
Wnd->Style = dwStyle & ~WS_VISIBLE;
|
||||
Wnd->style = dwStyle & ~WS_VISIBLE;
|
||||
|
||||
/* call hook */
|
||||
Cs.lpCreateParams = lpParam;
|
||||
|
@ -1871,7 +1871,7 @@ AllocErr:
|
|||
Cs.cy = Size.cy;
|
||||
Cs.x = Pos.x;
|
||||
Cs.y = Pos.y;
|
||||
Cs.style = Wnd->Style;
|
||||
Cs.style = Wnd->style;
|
||||
// Cs.lpszName = (LPCWSTR) WindowName->Buffer;
|
||||
// Cs.lpszClass = (LPCWSTR) ClassName->Buffer;
|
||||
Cs.lpszName = (LPCWSTR) WindowName;
|
||||
|
@ -1897,7 +1897,7 @@ AllocErr:
|
|||
// hwndInsertAfter = CbtCreate.hwndInsertAfter;
|
||||
|
||||
/* default positioning for overlapped windows */
|
||||
if(!(Wnd->Style & (WS_POPUP | WS_CHILD)))
|
||||
if(!(Wnd->style & (WS_POPUP | WS_CHILD)))
|
||||
{
|
||||
RECTL rc, WorkArea;
|
||||
PRTL_USER_PROCESS_PARAMETERS ProcessParams;
|
||||
|
@ -1991,16 +1991,16 @@ AllocErr:
|
|||
}
|
||||
|
||||
/* Initialize the window dimensions. */
|
||||
Wnd->WindowRect.left = Pos.x;
|
||||
Wnd->WindowRect.top = Pos.y;
|
||||
Wnd->WindowRect.right = Pos.x + Size.cx;
|
||||
Wnd->WindowRect.bottom = Pos.y + Size.cy;
|
||||
if (0 != (Wnd->Style & WS_CHILD) && ParentWindow)
|
||||
Wnd->rcWindow.left = Pos.x;
|
||||
Wnd->rcWindow.top = Pos.y;
|
||||
Wnd->rcWindow.right = Pos.x + Size.cx;
|
||||
Wnd->rcWindow.bottom = Pos.y + Size.cy;
|
||||
if (0 != (Wnd->style & WS_CHILD) && ParentWindow)
|
||||
{
|
||||
RECTL_vOffsetRect(&(Wnd->WindowRect), ParentWindow->Wnd->ClientRect.left,
|
||||
ParentWindow->Wnd->ClientRect.top);
|
||||
RECTL_vOffsetRect(&(Wnd->rcWindow), ParentWindow->Wnd->rcClient.left,
|
||||
ParentWindow->Wnd->rcClient.top);
|
||||
}
|
||||
Wnd->ClientRect = Wnd->WindowRect;
|
||||
Wnd->rcClient = Wnd->rcWindow;
|
||||
|
||||
/*
|
||||
* Get the size and position of the window.
|
||||
|
@ -2026,16 +2026,16 @@ AllocErr:
|
|||
Size.cy = 0;
|
||||
}
|
||||
|
||||
Wnd->WindowRect.left = Pos.x;
|
||||
Wnd->WindowRect.top = Pos.y;
|
||||
Wnd->WindowRect.right = Pos.x + Size.cx;
|
||||
Wnd->WindowRect.bottom = Pos.y + Size.cy;
|
||||
if (0 != (Wnd->Style & WS_CHILD) && ParentWindow)
|
||||
Wnd->rcWindow.left = Pos.x;
|
||||
Wnd->rcWindow.top = Pos.y;
|
||||
Wnd->rcWindow.right = Pos.x + Size.cx;
|
||||
Wnd->rcWindow.bottom = Pos.y + Size.cy;
|
||||
if (0 != (Wnd->style & WS_CHILD) && ParentWindow)
|
||||
{
|
||||
RECTL_vOffsetRect(&(Wnd->WindowRect), ParentWindow->Wnd->ClientRect.left,
|
||||
ParentWindow->Wnd->ClientRect.top);
|
||||
RECTL_vOffsetRect(&(Wnd->rcWindow), ParentWindow->Wnd->rcClient.left,
|
||||
ParentWindow->Wnd->rcClient.top);
|
||||
}
|
||||
Wnd->ClientRect = Wnd->WindowRect;
|
||||
Wnd->rcClient = Wnd->rcWindow;
|
||||
|
||||
/* FIXME: Initialize the window menu. */
|
||||
|
||||
|
@ -2057,19 +2057,19 @@ AllocErr:
|
|||
}
|
||||
|
||||
/* Calculate the non-client size. */
|
||||
MaxPos.x = Window->Wnd->WindowRect.left;
|
||||
MaxPos.y = Window->Wnd->WindowRect.top;
|
||||
MaxPos.x = Window->Wnd->rcWindow.left;
|
||||
MaxPos.y = Window->Wnd->rcWindow.top;
|
||||
|
||||
|
||||
DPRINT("IntCreateWindowEx(): About to get non-client size.\n");
|
||||
/* WinPosGetNonClientSize SENDS THE WM_NCCALCSIZE message */
|
||||
Result = co_WinPosGetNonClientSize(Window,
|
||||
&Window->Wnd->WindowRect,
|
||||
&Window->Wnd->ClientRect);
|
||||
&Window->Wnd->rcWindow,
|
||||
&Window->Wnd->rcClient);
|
||||
|
||||
RECTL_vOffsetRect(&Window->Wnd->WindowRect,
|
||||
MaxPos.x - Window->Wnd->WindowRect.left,
|
||||
MaxPos.y - Window->Wnd->WindowRect.top);
|
||||
RECTL_vOffsetRect(&Window->Wnd->rcWindow,
|
||||
MaxPos.x - Window->Wnd->rcWindow.left,
|
||||
MaxPos.y - Window->Wnd->rcWindow.top);
|
||||
|
||||
|
||||
if (NULL != ParentWindow)
|
||||
|
@ -2129,30 +2129,30 @@ AllocErr:
|
|||
|
||||
DPRINT("IntCreateWindow(): About to send WM_SIZE\n");
|
||||
|
||||
if ((Window->Wnd->ClientRect.right - Window->Wnd->ClientRect.left) < 0 ||
|
||||
(Window->Wnd->ClientRect.bottom - Window->Wnd->ClientRect.top) < 0)
|
||||
if ((Window->Wnd->rcClient.right - Window->Wnd->rcClient.left) < 0 ||
|
||||
(Window->Wnd->rcClient.bottom - Window->Wnd->rcClient.top) < 0)
|
||||
{
|
||||
DPRINT("Sending bogus WM_SIZE\n");
|
||||
}
|
||||
|
||||
lParam = MAKE_LONG(Window->Wnd->ClientRect.right -
|
||||
Window->Wnd->ClientRect.left,
|
||||
Window->Wnd->ClientRect.bottom -
|
||||
Window->Wnd->ClientRect.top);
|
||||
lParam = MAKE_LONG(Window->Wnd->rcClient.right -
|
||||
Window->Wnd->rcClient.left,
|
||||
Window->Wnd->rcClient.bottom -
|
||||
Window->Wnd->rcClient.top);
|
||||
co_IntSendMessage(Window->hSelf, WM_SIZE, SIZE_RESTORED,
|
||||
lParam);
|
||||
|
||||
DPRINT("IntCreateWindow(): About to send WM_MOVE\n");
|
||||
|
||||
if (0 != (Wnd->Style & WS_CHILD) && ParentWindow)
|
||||
if (0 != (Wnd->style & WS_CHILD) && ParentWindow)
|
||||
{
|
||||
lParam = MAKE_LONG(Wnd->ClientRect.left - ParentWindow->Wnd->ClientRect.left,
|
||||
Wnd->ClientRect.top - ParentWindow->Wnd->ClientRect.top);
|
||||
lParam = MAKE_LONG(Wnd->rcClient.left - ParentWindow->Wnd->rcClient.left,
|
||||
Wnd->rcClient.top - ParentWindow->Wnd->rcClient.top);
|
||||
}
|
||||
else
|
||||
{
|
||||
lParam = MAKE_LONG(Wnd->ClientRect.left,
|
||||
Wnd->ClientRect.top);
|
||||
lParam = MAKE_LONG(Wnd->rcClient.left,
|
||||
Wnd->rcClient.top);
|
||||
}
|
||||
|
||||
co_IntSendMessage(Window->hSelf, WM_MOVE, 0, lParam);
|
||||
|
@ -2162,17 +2162,17 @@ AllocErr:
|
|||
}
|
||||
|
||||
/* Show or maybe minimize or maximize the window. */
|
||||
if (Wnd->Style & (WS_MINIMIZE | WS_MAXIMIZE))
|
||||
if (Wnd->style & (WS_MINIMIZE | WS_MAXIMIZE))
|
||||
{
|
||||
RECTL NewPos;
|
||||
UINT16 SwFlag;
|
||||
|
||||
SwFlag = (Wnd->Style & WS_MINIMIZE) ? SW_MINIMIZE :
|
||||
SwFlag = (Wnd->style & WS_MINIMIZE) ? SW_MINIMIZE :
|
||||
SW_MAXIMIZE;
|
||||
|
||||
co_WinPosMinMaximize(Window, SwFlag, &NewPos);
|
||||
|
||||
SwFlag = ((Wnd->Style & WS_CHILD) || UserGetActiveWindow()) ?
|
||||
SwFlag = ((Wnd->style & WS_CHILD) || UserGetActiveWindow()) ?
|
||||
SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED :
|
||||
SWP_NOZORDER | SWP_FRAMECHANGED;
|
||||
|
||||
|
@ -2183,7 +2183,7 @@ AllocErr:
|
|||
}
|
||||
|
||||
/* Notify the parent window of a new child. */
|
||||
if ((Wnd->Style & WS_CHILD) &&
|
||||
if ((Wnd->style & WS_CHILD) &&
|
||||
(!(Wnd->ExStyle & WS_EX_NOPARENTNOTIFY)) && ParentWindow)
|
||||
{
|
||||
DPRINT("IntCreateWindow(): About to notify parent\n");
|
||||
|
@ -2204,20 +2204,20 @@ AllocErr:
|
|||
}
|
||||
|
||||
/* Initialize and show the window's scrollbars */
|
||||
if (Wnd->Style & WS_VSCROLL)
|
||||
if (Wnd->style & WS_VSCROLL)
|
||||
{
|
||||
co_UserShowScrollBar(Window, SB_VERT, TRUE);
|
||||
}
|
||||
if (Wnd->Style & WS_HSCROLL)
|
||||
if (Wnd->style & WS_HSCROLL)
|
||||
{
|
||||
co_UserShowScrollBar(Window, SB_HORZ, TRUE);
|
||||
}
|
||||
|
||||
if (dwStyle & WS_VISIBLE)
|
||||
{
|
||||
if (Wnd->Style & WS_MAXIMIZE)
|
||||
if (Wnd->style & WS_MAXIMIZE)
|
||||
dwShowMode = SW_SHOW;
|
||||
else if (Wnd->Style & WS_MINIMIZE)
|
||||
else if (Wnd->style & WS_MINIMIZE)
|
||||
dwShowMode = SW_SHOWMINIMIZED;
|
||||
|
||||
DPRINT("IntCreateWindow(): About to show window\n");
|
||||
|
@ -2237,8 +2237,8 @@ AllocErr:
|
|||
if (ClassAtom == gpsi->atomSysClass[ICLS_EDIT])
|
||||
{
|
||||
PCALLPROC CallProc;
|
||||
//CallProc = CreateCallProc(NULL, Wnd->WndProc, bUnicodeWindow, Wnd->ti->ppi);
|
||||
CallProc = CreateCallProc(NULL, Wnd->WndProc, Wnd->Unicode , Wnd->ti->ppi);
|
||||
//CallProc = CreateCallProc(NULL, Wnd->lpfnWndProc, bUnicodeWindow, Wnd->ti->ppi);
|
||||
CallProc = CreateCallProc(NULL, Wnd->lpfnWndProc, Wnd->Unicode , Wnd->ti->ppi);
|
||||
|
||||
if (!CallProc)
|
||||
{
|
||||
|
@ -2247,7 +2247,7 @@ AllocErr:
|
|||
}
|
||||
else
|
||||
{
|
||||
UserAddCallProcToClass(Wnd->Class, CallProc);
|
||||
UserAddCallProcToClass(Wnd->pcls, CallProc);
|
||||
Wnd->CallProc = CallProc;
|
||||
Wnd->IsSystem = FALSE;
|
||||
}
|
||||
|
@ -2447,7 +2447,7 @@ BOOLEAN FASTCALL co_UserDestroyWindow(PWINDOW_OBJECT Window)
|
|||
IntDereferenceMessageQueue(Window->MessageQueue);
|
||||
|
||||
IntEngWindowChanged(Window, WOC_DELETE);
|
||||
isChild = (0 != (Wnd->Style & WS_CHILD));
|
||||
isChild = (0 != (Wnd->style & WS_CHILD));
|
||||
|
||||
#if 0 /* FIXME */
|
||||
|
||||
|
@ -2510,7 +2510,7 @@ BOOLEAN FASTCALL co_UserDestroyWindow(PWINDOW_OBJECT Window)
|
|||
if (Child->hOwner != NULL)
|
||||
{
|
||||
Child->hOwner = NULL;
|
||||
Child->Wnd->Owner = NULL;
|
||||
Child->Wnd->spwndOwner = NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2655,8 +2655,8 @@ IntFindWindow(PWINDOW_OBJECT Parent,
|
|||
/* Do not send WM_GETTEXT messages in the kernel mode version!
|
||||
The user mode version however calls GetWindowText() which will
|
||||
send WM_GETTEXT messages to windows belonging to its processes */
|
||||
if((!CheckWindowName || !RtlCompareUnicodeString(WindowName, &(Child->Wnd->WindowName), TRUE)) &&
|
||||
(!ClassAtom || Child->Wnd->Class->Atom == ClassAtom))
|
||||
if((!CheckWindowName || !RtlCompareUnicodeString(WindowName, &(Child->Wnd->strName), TRUE)) &&
|
||||
(!ClassAtom || Child->Wnd->pcls->Atom == ClassAtom))
|
||||
{
|
||||
Ret = Child->hSelf;
|
||||
break;
|
||||
|
@ -2827,9 +2827,9 @@ NtUserFindWindowEx(HWND hwndParent,
|
|||
The user mode version however calls GetWindowText() which will
|
||||
send WM_GETTEXT messages to windows belonging to its processes */
|
||||
WindowMatches = !CheckWindowName || !RtlCompareUnicodeString(
|
||||
&WindowName, &TopLevelWindow->Wnd->WindowName, TRUE);
|
||||
&WindowName, &TopLevelWindow->Wnd->strName, TRUE);
|
||||
ClassMatches = (ClassAtom == (RTL_ATOM)0) ||
|
||||
ClassAtom == TopLevelWindow->Wnd->Class->Atom;
|
||||
ClassAtom == TopLevelWindow->Wnd->pcls->Atom;
|
||||
|
||||
if (WindowMatches && ClassMatches)
|
||||
{
|
||||
|
@ -3596,7 +3596,7 @@ UserGetWindowLong(HWND hWnd, DWORD Index, BOOL Ansi)
|
|||
|
||||
if ((INT)Index >= 0)
|
||||
{
|
||||
if ((Index + sizeof(LONG)) > Window->Wnd->ExtraDataSize)
|
||||
if ((Index + sizeof(LONG)) > Window->Wnd->cbwndExtra)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
|
@ -3612,7 +3612,7 @@ UserGetWindowLong(HWND hWnd, DWORD Index, BOOL Ansi)
|
|||
break;
|
||||
|
||||
case GWL_STYLE:
|
||||
Result = Wnd->Style;
|
||||
Result = Wnd->style;
|
||||
break;
|
||||
|
||||
case GWL_WNDPROC:
|
||||
|
@ -3621,7 +3621,7 @@ UserGetWindowLong(HWND hWnd, DWORD Index, BOOL Ansi)
|
|||
break;
|
||||
|
||||
case GWL_HINSTANCE:
|
||||
Result = (LONG) Wnd->Instance;
|
||||
Result = (LONG) Wnd->hModule;
|
||||
break;
|
||||
|
||||
case GWL_HWNDPARENT:
|
||||
|
@ -3640,7 +3640,7 @@ UserGetWindowLong(HWND hWnd, DWORD Index, BOOL Ansi)
|
|||
break;
|
||||
|
||||
case GWL_USERDATA:
|
||||
Result = Wnd->UserData;
|
||||
Result = Wnd->dwUserData;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -3709,23 +3709,23 @@ IntSetWindowProc(PWINDOW_OBJECT Window,
|
|||
/* attempt to get the previous window proc */
|
||||
if (Wnd->IsSystem)
|
||||
{
|
||||
Ret = (Ansi ? Wnd->WndProcExtra : Wnd->WndProc);
|
||||
Ret = (Ansi ? Wnd->WndProcExtra : Wnd->lpfnWndProc);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!Ansi == Wnd->Unicode)
|
||||
{
|
||||
Ret = Wnd->WndProc;
|
||||
Ret = Wnd->lpfnWndProc;
|
||||
}
|
||||
else
|
||||
{
|
||||
CallProc = UserFindCallProc(Wnd->Class,
|
||||
Wnd->WndProc,
|
||||
CallProc = UserFindCallProc(Wnd->pcls,
|
||||
Wnd->lpfnWndProc,
|
||||
Wnd->Unicode);
|
||||
if (CallProc == NULL)
|
||||
{
|
||||
CallProc = CreateCallProc(NULL,
|
||||
Wnd->WndProc,
|
||||
Wnd->lpfnWndProc,
|
||||
Wnd->Unicode,
|
||||
Wnd->ti->ppi);
|
||||
if (CallProc == NULL)
|
||||
|
@ -3734,13 +3734,13 @@ IntSetWindowProc(PWINDOW_OBJECT Window,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
UserAddCallProcToClass(Wnd->Class,
|
||||
UserAddCallProcToClass(Wnd->pcls,
|
||||
CallProc);
|
||||
}
|
||||
/* BugBoy Comments: Added this if else, see below comments */
|
||||
if (!Wnd->CallProc)
|
||||
{
|
||||
Ret = Wnd->WndProc;
|
||||
Ret = Wnd->lpfnWndProc;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3756,17 +3756,17 @@ IntSetWindowProc(PWINDOW_OBJECT Window,
|
|||
}
|
||||
}
|
||||
|
||||
if (Wnd->Class->System)
|
||||
if (Wnd->pcls->System)
|
||||
{
|
||||
/* check if the new procedure matches with the one in the
|
||||
window class. If so, we need to restore both procedures! */
|
||||
Wnd->IsSystem = (NewWndProc == Wnd->Class->WndProc ||
|
||||
NewWndProc == Wnd->Class->WndProcExtra);
|
||||
Wnd->IsSystem = (NewWndProc == Wnd->pcls->WndProc ||
|
||||
NewWndProc == Wnd->pcls->WndProcExtra);
|
||||
|
||||
if (Wnd->IsSystem)
|
||||
{
|
||||
Wnd->WndProc = Wnd->Class->WndProc;
|
||||
Wnd->WndProcExtra = Wnd->Class->WndProcExtra;
|
||||
Wnd->lpfnWndProc = Wnd->pcls->WndProc;
|
||||
Wnd->WndProcExtra = Wnd->pcls->WndProcExtra;
|
||||
Wnd->Unicode = !Ansi;
|
||||
return Ret;
|
||||
}
|
||||
|
@ -3775,7 +3775,7 @@ IntSetWindowProc(PWINDOW_OBJECT Window,
|
|||
ASSERT(!Wnd->IsSystem);
|
||||
|
||||
/* update the window procedure */
|
||||
Wnd->WndProc = NewWndProc;
|
||||
Wnd->lpfnWndProc = NewWndProc;
|
||||
Wnd->Unicode = !Ansi;
|
||||
|
||||
return Ret;
|
||||
|
@ -3808,7 +3808,7 @@ co_UserSetWindowLong(HWND hWnd, DWORD Index, LONG NewValue, BOOL Ansi)
|
|||
|
||||
if ((INT)Index >= 0)
|
||||
{
|
||||
if ((Index + sizeof(LONG)) > Wnd->ExtraDataSize)
|
||||
if ((Index + sizeof(LONG)) > Wnd->cbwndExtra)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
return( 0);
|
||||
|
@ -3841,11 +3841,11 @@ co_UserSetWindowLong(HWND hWnd, DWORD Index, LONG NewValue, BOOL Ansi)
|
|||
break;
|
||||
|
||||
case GWL_STYLE:
|
||||
OldValue = (LONG) Wnd->Style;
|
||||
OldValue = (LONG) Wnd->style;
|
||||
Style.styleOld = OldValue;
|
||||
Style.styleNew = NewValue;
|
||||
co_IntSendMessage(hWnd, WM_STYLECHANGING, GWL_STYLE, (LPARAM) &Style);
|
||||
Wnd->Style = (DWORD)Style.styleNew;
|
||||
Wnd->style = (DWORD)Style.styleNew;
|
||||
co_IntSendMessage(hWnd, WM_STYLECHANGED, GWL_STYLE, (LPARAM) &Style);
|
||||
break;
|
||||
|
||||
|
@ -3859,8 +3859,8 @@ co_UserSetWindowLong(HWND hWnd, DWORD Index, LONG NewValue, BOOL Ansi)
|
|||
}
|
||||
|
||||
case GWL_HINSTANCE:
|
||||
OldValue = (LONG) Wnd->Instance;
|
||||
Wnd->Instance = (HINSTANCE) NewValue;
|
||||
OldValue = (LONG) Wnd->hModule;
|
||||
Wnd->hModule = (HINSTANCE) NewValue;
|
||||
break;
|
||||
|
||||
case GWL_HWNDPARENT:
|
||||
|
@ -3877,8 +3877,8 @@ co_UserSetWindowLong(HWND hWnd, DWORD Index, LONG NewValue, BOOL Ansi)
|
|||
break;
|
||||
|
||||
case GWL_USERDATA:
|
||||
OldValue = Wnd->UserData;
|
||||
Wnd->UserData = NewValue;
|
||||
OldValue = Wnd->dwUserData;
|
||||
Wnd->dwUserData = NewValue;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -3959,7 +3959,7 @@ NtUserSetWindowWord(HWND hWnd, INT Index, WORD NewValue)
|
|||
}
|
||||
}
|
||||
|
||||
if (Index > Window->Wnd->ExtraDataSize - sizeof(WORD))
|
||||
if (Index > Window->Wnd->cbwndExtra - sizeof(WORD))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
RETURN( 0);
|
||||
|
@ -4011,29 +4011,29 @@ NtUserGetWindowPlacement(HWND hWnd,
|
|||
}
|
||||
|
||||
Safepl.flags = 0;
|
||||
if (0 == (Wnd->Style & WS_VISIBLE))
|
||||
if (0 == (Wnd->style & WS_VISIBLE))
|
||||
{
|
||||
Safepl.showCmd = SW_HIDE;
|
||||
}
|
||||
else if ((0 != (Window->Flags & WINDOWOBJECT_RESTOREMAX) ||
|
||||
0 != (Wnd->Style & WS_MAXIMIZE)) &&
|
||||
0 == (Wnd->Style & WS_MINIMIZE))
|
||||
0 != (Wnd->style & WS_MAXIMIZE)) &&
|
||||
0 == (Wnd->style & WS_MINIMIZE))
|
||||
{
|
||||
Safepl.showCmd = SW_SHOWMAXIMIZED;
|
||||
}
|
||||
else if (0 != (Wnd->Style & WS_MINIMIZE))
|
||||
else if (0 != (Wnd->style & WS_MINIMIZE))
|
||||
{
|
||||
Safepl.showCmd = SW_SHOWMINIMIZED;
|
||||
}
|
||||
else if (0 != (Wnd->Style & WS_VISIBLE))
|
||||
else if (0 != (Wnd->style & WS_VISIBLE))
|
||||
{
|
||||
Safepl.showCmd = SW_SHOWNORMAL;
|
||||
}
|
||||
|
||||
Size.x = Wnd->WindowRect.left;
|
||||
Size.y = Wnd->WindowRect.top;
|
||||
Size.x = Wnd->rcWindow.left;
|
||||
Size.y = Wnd->rcWindow.top;
|
||||
WinPosInitInternalPos(Window, &Size,
|
||||
&Wnd->WindowRect);
|
||||
&Wnd->rcWindow);
|
||||
|
||||
Safepl.rcNormalPosition = Wnd->InternalPos.NormalRect;
|
||||
Safepl.ptMinPosition = Wnd->InternalPos.IconPos;
|
||||
|
@ -4327,14 +4327,14 @@ NtUserSetWindowFNID(HWND hWnd,
|
|||
}
|
||||
Wnd = Window->Wnd;
|
||||
|
||||
if (Wnd->Class)
|
||||
if (Wnd->pcls)
|
||||
{ // From user land we only set these.
|
||||
if ((fnID != FNID_DESTROY) || ((fnID < FNID_BUTTON) && (fnID > FNID_IME)) )
|
||||
{
|
||||
RETURN( FALSE);
|
||||
}
|
||||
else
|
||||
Wnd->Class->fnID |= fnID;
|
||||
Wnd->pcls->fnID |= fnID;
|
||||
}
|
||||
RETURN( TRUE);
|
||||
|
||||
|
@ -4381,7 +4381,7 @@ NtUserSetWindowPlacement(HWND hWnd,
|
|||
|
||||
UserRefObjectCo(Window, &Ref);
|
||||
|
||||
if ((Wnd->Style & (WS_MAXIMIZE | WS_MINIMIZE)) == 0)
|
||||
if ((Wnd->style & (WS_MAXIMIZE | WS_MINIMIZE)) == 0)
|
||||
{
|
||||
co_WinPosSetWindowPos(Window, NULL,
|
||||
Safepl.rcNormalPosition.left, Safepl.rcNormalPosition.top,
|
||||
|
@ -4483,10 +4483,10 @@ IntGetWindowRgn(PWINDOW_OBJECT Window, HRGN hRgn)
|
|||
Wnd = Window->Wnd;
|
||||
|
||||
/* Create a new window region using the window rectangle */
|
||||
VisRgn = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->WindowRect);
|
||||
NtGdiOffsetRgn(VisRgn, -Window->Wnd->WindowRect.left, -Window->Wnd->WindowRect.top);
|
||||
VisRgn = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->rcWindow);
|
||||
NtGdiOffsetRgn(VisRgn, -Window->Wnd->rcWindow.left, -Window->Wnd->rcWindow.top);
|
||||
/* if there's a region assigned to the window, combine them both */
|
||||
if(Window->WindowRegion && !(Wnd->Style & WS_MINIMIZE))
|
||||
if(Window->WindowRegion && !(Wnd->style & WS_MINIMIZE))
|
||||
NtGdiCombineRgn(VisRgn, VisRgn, Window->WindowRegion, RGN_AND);
|
||||
/* Copy the region into hRgn */
|
||||
NtGdiCombineRgn(hRgn, VisRgn, NULL, RGN_COPY);
|
||||
|
@ -4524,10 +4524,10 @@ IntGetWindowRgnBox(PWINDOW_OBJECT Window, RECTL *Rect)
|
|||
Wnd = Window->Wnd;
|
||||
|
||||
/* Create a new window region using the window rectangle */
|
||||
VisRgn = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->WindowRect);
|
||||
NtGdiOffsetRgn(VisRgn, -Window->Wnd->WindowRect.left, -Window->Wnd->WindowRect.top);
|
||||
VisRgn = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->rcWindow);
|
||||
NtGdiOffsetRgn(VisRgn, -Window->Wnd->rcWindow.left, -Window->Wnd->rcWindow.top);
|
||||
/* if there's a region assigned to the window, combine them both */
|
||||
if(Window->WindowRegion && !(Wnd->Style & WS_MINIMIZE))
|
||||
if(Window->WindowRegion && !(Wnd->style & WS_MINIMIZE))
|
||||
NtGdiCombineRgn(VisRgn, VisRgn, Window->WindowRegion, RGN_AND);
|
||||
|
||||
if((pRgn = REGION_LockRgn(VisRgn)))
|
||||
|
@ -4798,38 +4798,38 @@ NtUserDefSetText(HWND hWnd, PLARGE_STRING WindowText)
|
|||
|
||||
if (UnicodeString.Length != 0)
|
||||
{
|
||||
if (Wnd->WindowName.MaximumLength > 0 &&
|
||||
UnicodeString.Length <= Wnd->WindowName.MaximumLength - sizeof(UNICODE_NULL))
|
||||
if (Wnd->strName.MaximumLength > 0 &&
|
||||
UnicodeString.Length <= Wnd->strName.MaximumLength - sizeof(UNICODE_NULL))
|
||||
{
|
||||
ASSERT(Wnd->WindowName.Buffer != NULL);
|
||||
ASSERT(Wnd->strName.Buffer != NULL);
|
||||
|
||||
Wnd->WindowName.Length = UnicodeString.Length;
|
||||
Wnd->WindowName.Buffer[UnicodeString.Length / sizeof(WCHAR)] = L'\0';
|
||||
RtlCopyMemory(Wnd->WindowName.Buffer,
|
||||
Wnd->strName.Length = UnicodeString.Length;
|
||||
Wnd->strName.Buffer[UnicodeString.Length / sizeof(WCHAR)] = L'\0';
|
||||
RtlCopyMemory(Wnd->strName.Buffer,
|
||||
UnicodeString.Buffer,
|
||||
UnicodeString.Length);
|
||||
}
|
||||
else
|
||||
{
|
||||
PWCHAR buf;
|
||||
Wnd->WindowName.MaximumLength = Wnd->WindowName.Length = 0;
|
||||
buf = Wnd->WindowName.Buffer;
|
||||
Wnd->WindowName.Buffer = NULL;
|
||||
Wnd->strName.MaximumLength = Wnd->strName.Length = 0;
|
||||
buf = Wnd->strName.Buffer;
|
||||
Wnd->strName.Buffer = NULL;
|
||||
if (buf != NULL)
|
||||
{
|
||||
DesktopHeapFree(Wnd->pdesktop, buf);
|
||||
}
|
||||
|
||||
Wnd->WindowName.Buffer = DesktopHeapAlloc(Wnd->pdesktop,
|
||||
Wnd->strName.Buffer = DesktopHeapAlloc(Wnd->pdesktop,
|
||||
UnicodeString.Length + sizeof(UNICODE_NULL));
|
||||
if (Wnd->WindowName.Buffer != NULL)
|
||||
if (Wnd->strName.Buffer != NULL)
|
||||
{
|
||||
Wnd->WindowName.Buffer[UnicodeString.Length / sizeof(WCHAR)] = L'\0';
|
||||
RtlCopyMemory(Wnd->WindowName.Buffer,
|
||||
Wnd->strName.Buffer[UnicodeString.Length / sizeof(WCHAR)] = L'\0';
|
||||
RtlCopyMemory(Wnd->strName.Buffer,
|
||||
UnicodeString.Buffer,
|
||||
UnicodeString.Length);
|
||||
Wnd->WindowName.MaximumLength = UnicodeString.Length + sizeof(UNICODE_NULL);
|
||||
Wnd->WindowName.Length = UnicodeString.Length;
|
||||
Wnd->strName.MaximumLength = UnicodeString.Length + sizeof(UNICODE_NULL);
|
||||
Wnd->strName.Length = UnicodeString.Length;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -4841,9 +4841,9 @@ NtUserDefSetText(HWND hWnd, PLARGE_STRING WindowText)
|
|||
}
|
||||
else
|
||||
{
|
||||
Wnd->WindowName.Length = 0;
|
||||
if (Wnd->WindowName.Buffer != NULL)
|
||||
Wnd->WindowName.Buffer[0] = L'\0';
|
||||
Wnd->strName.Length = 0;
|
||||
if (Wnd->strName.Buffer != NULL)
|
||||
Wnd->strName.Buffer[0] = L'\0';
|
||||
}
|
||||
|
||||
// HAX! FIXME! Windows does not do this in here!
|
||||
|
@ -4894,7 +4894,7 @@ NtUserInternalGetWindowText(HWND hWnd, LPWSTR lpString, INT nMaxCount)
|
|||
}
|
||||
Wnd = Window->Wnd;
|
||||
|
||||
Result = Wnd->WindowName.Length / sizeof(WCHAR);
|
||||
Result = Wnd->strName.Length / sizeof(WCHAR);
|
||||
if(lpString)
|
||||
{
|
||||
const WCHAR Terminator = L'\0';
|
||||
|
@ -4904,7 +4904,7 @@ NtUserInternalGetWindowText(HWND hWnd, LPWSTR lpString, INT nMaxCount)
|
|||
Copy = min(nMaxCount - 1, Result);
|
||||
if(Copy > 0)
|
||||
{
|
||||
Status = MmCopyToCaller(Buffer, Wnd->WindowName.Buffer, Copy * sizeof(WCHAR));
|
||||
Status = MmCopyToCaller(Buffer, Wnd->strName.Buffer, Copy * sizeof(WCHAR));
|
||||
if(!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
|
@ -4971,7 +4971,7 @@ IntShowOwnedPopups(PWINDOW_OBJECT OwnerWnd, BOOL fShow )
|
|||
}
|
||||
else
|
||||
{
|
||||
if (pWnd->Wnd->Style & WS_VISIBLE)
|
||||
if (pWnd->Wnd->style & WS_VISIBLE)
|
||||
{
|
||||
/* In Windows, ShowOwnedPopups(FALSE) generates
|
||||
* WM_SHOWWINDOW messages with SW_PARENTCLOSING,
|
||||
|
|
|
@ -64,8 +64,8 @@ IntGetClientOrigin(PWINDOW_OBJECT Window OPTIONAL, LPPOINT Point)
|
|||
Point->x = Point->y = 0;
|
||||
return FALSE;
|
||||
}
|
||||
Point->x = Window->Wnd->ClientRect.left;
|
||||
Point->y = Window->Wnd->ClientRect.top;
|
||||
Point->x = Window->Wnd->rcClient.left;
|
||||
Point->y = Window->Wnd->rcClient.top;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ BOOL FASTCALL can_activate_window( PWINDOW_OBJECT Wnd OPTIONAL)
|
|||
|
||||
if (!Wnd) return FALSE;
|
||||
if (!Wnd->Wnd) return FALSE;
|
||||
style = Wnd->Wnd->Style;
|
||||
style = Wnd->Wnd->style;
|
||||
if (!(style & WS_VISIBLE) &&
|
||||
Wnd->OwnerThread->ThreadsProcess != CsrProcess) return FALSE;
|
||||
if ((style & (WS_POPUP|WS_CHILD)) == WS_CHILD) return FALSE;
|
||||
|
@ -150,7 +150,7 @@ co_WinPosActivateOtherWindow(PWINDOW_OBJECT Window)
|
|||
}
|
||||
|
||||
/* If this is popup window, try to activate the owner first. */
|
||||
if ((Wnd->Style & WS_POPUP) && (WndTo = IntGetOwner(Window)))
|
||||
if ((Wnd->style & WS_POPUP) && (WndTo = IntGetOwner(Window)))
|
||||
{
|
||||
WndTo = UserGetAncestor( WndTo, GA_ROOT );
|
||||
if (can_activate_window(WndTo)) goto done;
|
||||
|
@ -216,7 +216,7 @@ co_WinPosArrangeIconicWindows(PWINDOW_OBJECT parent)
|
|||
|
||||
ChildWnd = WndChild->Wnd;
|
||||
|
||||
if((ChildWnd->Style & WS_MINIMIZE) != 0 )
|
||||
if((ChildWnd->style & WS_MINIMIZE) != 0 )
|
||||
{
|
||||
USER_REFERENCE_ENTRY Ref;
|
||||
UserRefObjectCo(WndChild, &Ref);
|
||||
|
@ -266,12 +266,12 @@ WinPosInitInternalPos(PWINDOW_OBJECT Window, POINT *pt, RECTL *RestoreRect)
|
|||
if(IntIsDesktopWindow(Parent))
|
||||
IntGetDesktopWorkArea(Desktop, &WorkArea);
|
||||
else
|
||||
WorkArea = Parent->Wnd->ClientRect;
|
||||
WorkArea = Parent->Wnd->rcClient;
|
||||
}
|
||||
else
|
||||
IntGetDesktopWorkArea(Desktop, &WorkArea);
|
||||
|
||||
Wnd->InternalPos.NormalRect = Window->Wnd->WindowRect;
|
||||
Wnd->InternalPos.NormalRect = Window->Wnd->rcWindow;
|
||||
IntGetWindowBorderMeasures(Window, &XInc, &YInc);
|
||||
Wnd->InternalPos.MaxPos.x = WorkArea.left - XInc;
|
||||
Wnd->InternalPos.MaxPos.y = WorkArea.top - YInc;
|
||||
|
@ -280,11 +280,11 @@ WinPosInitInternalPos(PWINDOW_OBJECT Window, POINT *pt, RECTL *RestoreRect)
|
|||
|
||||
Wnd->InternalPosInitialized = TRUE;
|
||||
}
|
||||
if (Wnd->Style & WS_MINIMIZE)
|
||||
if (Wnd->style & WS_MINIMIZE)
|
||||
{
|
||||
Wnd->InternalPos.IconPos = *pt;
|
||||
}
|
||||
else if (Wnd->Style & WS_MAXIMIZE)
|
||||
else if (Wnd->style & WS_MAXIMIZE)
|
||||
{
|
||||
Wnd->InternalPos.MaxPos = *pt;
|
||||
}
|
||||
|
@ -304,14 +304,14 @@ co_WinPosMinMaximize(PWINDOW_OBJECT Window, UINT ShowFlag, RECT* NewPos)
|
|||
ASSERT_REFS_CO(Window);
|
||||
Wnd = Window->Wnd;
|
||||
|
||||
Size.x = Wnd->WindowRect.left;
|
||||
Size.y = Wnd->WindowRect.top;
|
||||
WinPosInitInternalPos(Window, &Size, &Wnd->WindowRect);
|
||||
Size.x = Wnd->rcWindow.left;
|
||||
Size.y = Wnd->rcWindow.top;
|
||||
WinPosInitInternalPos(Window, &Size, &Wnd->rcWindow);
|
||||
|
||||
if (co_HOOK_CallHooks( WH_CBT, HCBT_MINMAX, (WPARAM)Window->hSelf, ShowFlag))
|
||||
return SWP_NOSIZE | SWP_NOMOVE;
|
||||
|
||||
if (Wnd->Style & WS_MINIMIZE)
|
||||
if (Wnd->style & WS_MINIMIZE)
|
||||
{
|
||||
if (!co_IntSendMessage(Window->hSelf, WM_QUERYOPEN, 0, 0))
|
||||
{
|
||||
|
@ -323,10 +323,10 @@ co_WinPosMinMaximize(PWINDOW_OBJECT Window, UINT ShowFlag, RECT* NewPos)
|
|||
{
|
||||
case SW_MINIMIZE:
|
||||
{
|
||||
if (Wnd->Style & WS_MAXIMIZE)
|
||||
if (Wnd->style & WS_MAXIMIZE)
|
||||
{
|
||||
Window->Flags |= WINDOWOBJECT_RESTOREMAX;
|
||||
Wnd->Style &= ~WS_MAXIMIZE;
|
||||
Wnd->style &= ~WS_MAXIMIZE;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -334,7 +334,7 @@ co_WinPosMinMaximize(PWINDOW_OBJECT Window, UINT ShowFlag, RECT* NewPos)
|
|||
}
|
||||
co_UserRedrawWindow(Window, NULL, 0, RDW_VALIDATE | RDW_NOERASE |
|
||||
RDW_NOINTERNALPAINT);
|
||||
Wnd->Style |= WS_MINIMIZE;
|
||||
Wnd->style |= WS_MINIMIZE;
|
||||
WinPosFindIconPos(Window, &Wnd->InternalPos.IconPos);
|
||||
RECTL_vSetRect(NewPos, Wnd->InternalPos.IconPos.x, Wnd->InternalPos.IconPos.y,
|
||||
UserGetSystemMetrics(SM_CXMINIMIZED),
|
||||
|
@ -349,11 +349,11 @@ co_WinPosMinMaximize(PWINDOW_OBJECT Window, UINT ShowFlag, RECT* NewPos)
|
|||
NULL, NULL);
|
||||
DPRINT("Maximize: %d,%d %dx%d\n",
|
||||
Wnd->InternalPos.MaxPos.x, Wnd->InternalPos.MaxPos.y, Size.x, Size.y);
|
||||
if (Wnd->Style & WS_MINIMIZE)
|
||||
if (Wnd->style & WS_MINIMIZE)
|
||||
{
|
||||
Wnd->Style &= ~WS_MINIMIZE;
|
||||
Wnd->style &= ~WS_MINIMIZE;
|
||||
}
|
||||
Wnd->Style |= WS_MAXIMIZE;
|
||||
Wnd->style |= WS_MAXIMIZE;
|
||||
RECTL_vSetRect(NewPos, Wnd->InternalPos.MaxPos.x, Wnd->InternalPos.MaxPos.y,
|
||||
Size.x, Size.y);
|
||||
break;
|
||||
|
@ -361,14 +361,14 @@ co_WinPosMinMaximize(PWINDOW_OBJECT Window, UINT ShowFlag, RECT* NewPos)
|
|||
|
||||
case SW_RESTORE:
|
||||
{
|
||||
if (Wnd->Style & WS_MINIMIZE)
|
||||
if (Wnd->style & WS_MINIMIZE)
|
||||
{
|
||||
Wnd->Style &= ~WS_MINIMIZE;
|
||||
Wnd->style &= ~WS_MINIMIZE;
|
||||
if (Window->Flags & WINDOWOBJECT_RESTOREMAX)
|
||||
{
|
||||
co_WinPosGetMinMaxInfo(Window, &Size,
|
||||
&Wnd->InternalPos.MaxPos, NULL, NULL);
|
||||
Wnd->Style |= WS_MAXIMIZE;
|
||||
Wnd->style |= WS_MAXIMIZE;
|
||||
RECTL_vSetRect(NewPos, Wnd->InternalPos.MaxPos.x,
|
||||
Wnd->InternalPos.MaxPos.y, Size.x, Size.y);
|
||||
break;
|
||||
|
@ -383,11 +383,11 @@ co_WinPosMinMaximize(PWINDOW_OBJECT Window, UINT ShowFlag, RECT* NewPos)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!(Wnd->Style & WS_MAXIMIZE))
|
||||
if (!(Wnd->style & WS_MAXIMIZE))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Wnd->Style &= ~WS_MAXIMIZE;
|
||||
Wnd->style &= ~WS_MAXIMIZE;
|
||||
*NewPos = Wnd->InternalPos.NormalRect;
|
||||
NewPos->right -= NewPos->left;
|
||||
NewPos->bottom -= NewPos->top;
|
||||
|
@ -517,17 +517,17 @@ co_WinPosDoNCCALCSize(PWINDOW_OBJECT Window, PWINDOWPOS WinPos,
|
|||
WINDOWPOS winposCopy;
|
||||
|
||||
params.rgrc[0] = *WindowRect;
|
||||
params.rgrc[1] = Window->Wnd->WindowRect;
|
||||
params.rgrc[2] = Window->Wnd->ClientRect;
|
||||
params.rgrc[1] = Window->Wnd->rcWindow;
|
||||
params.rgrc[2] = Window->Wnd->rcClient;
|
||||
Parent = Window->Parent;
|
||||
if (0 != (Wnd->Style & WS_CHILD) && Parent)
|
||||
if (0 != (Wnd->style & WS_CHILD) && Parent)
|
||||
{
|
||||
RECTL_vOffsetRect(&(params.rgrc[0]), - Parent->Wnd->ClientRect.left,
|
||||
- Parent->Wnd->ClientRect.top);
|
||||
RECTL_vOffsetRect(&(params.rgrc[1]), - Parent->Wnd->ClientRect.left,
|
||||
- Parent->Wnd->ClientRect.top);
|
||||
RECTL_vOffsetRect(&(params.rgrc[2]), - Parent->Wnd->ClientRect.left,
|
||||
- Parent->Wnd->ClientRect.top);
|
||||
RECTL_vOffsetRect(&(params.rgrc[0]), - Parent->Wnd->rcClient.left,
|
||||
- Parent->Wnd->rcClient.top);
|
||||
RECTL_vOffsetRect(&(params.rgrc[1]), - Parent->Wnd->rcClient.left,
|
||||
- Parent->Wnd->rcClient.top);
|
||||
RECTL_vOffsetRect(&(params.rgrc[2]), - Parent->Wnd->rcClient.left,
|
||||
- Parent->Wnd->rcClient.top);
|
||||
}
|
||||
params.lppos = &winposCopy;
|
||||
winposCopy = *WinPos;
|
||||
|
@ -539,26 +539,26 @@ co_WinPosDoNCCALCSize(PWINDOW_OBJECT Window, PWINDOWPOS WinPos,
|
|||
params.rgrc[0].top <= params.rgrc[0].bottom)
|
||||
{
|
||||
*ClientRect = params.rgrc[0];
|
||||
if ((Wnd->Style & WS_CHILD) && Parent)
|
||||
if ((Wnd->style & WS_CHILD) && Parent)
|
||||
{
|
||||
RECTL_vOffsetRect(ClientRect, Parent->Wnd->ClientRect.left,
|
||||
Parent->Wnd->ClientRect.top);
|
||||
RECTL_vOffsetRect(ClientRect, Parent->Wnd->rcClient.left,
|
||||
Parent->Wnd->rcClient.top);
|
||||
}
|
||||
FixClientRect(ClientRect, WindowRect);
|
||||
}
|
||||
|
||||
/* FIXME: WVR_ALIGNxxx */
|
||||
|
||||
if (ClientRect->left != Wnd->ClientRect.left ||
|
||||
ClientRect->top != Wnd->ClientRect.top)
|
||||
if (ClientRect->left != Wnd->rcClient.left ||
|
||||
ClientRect->top != Wnd->rcClient.top)
|
||||
{
|
||||
WinPos->flags &= ~SWP_NOCLIENTMOVE;
|
||||
}
|
||||
|
||||
if ((ClientRect->right - ClientRect->left !=
|
||||
Wnd->ClientRect.right - Wnd->ClientRect.left) ||
|
||||
Wnd->rcClient.right - Wnd->rcClient.left) ||
|
||||
(ClientRect->bottom - ClientRect->top !=
|
||||
Wnd->ClientRect.bottom - Wnd->ClientRect.top))
|
||||
Wnd->rcClient.bottom - Wnd->rcClient.top))
|
||||
{
|
||||
WinPos->flags &= ~SWP_NOCLIENTSIZE;
|
||||
}
|
||||
|
@ -566,8 +566,8 @@ co_WinPosDoNCCALCSize(PWINDOW_OBJECT Window, PWINDOWPOS WinPos,
|
|||
else
|
||||
{
|
||||
if (! (WinPos->flags & SWP_NOMOVE)
|
||||
&& (ClientRect->left != Wnd->ClientRect.left ||
|
||||
ClientRect->top != Wnd->ClientRect.top))
|
||||
&& (ClientRect->left != Wnd->rcClient.left ||
|
||||
ClientRect->top != Wnd->rcClient.top))
|
||||
{
|
||||
WinPos->flags &= ~SWP_NOCLIENTMOVE;
|
||||
}
|
||||
|
@ -594,8 +594,8 @@ co_WinPosDoWinPosChanging(PWINDOW_OBJECT Window,
|
|||
co_IntPostOrSendMessage(Window->hSelf, WM_WINDOWPOSCHANGING, 0, (LPARAM) WinPos);
|
||||
}
|
||||
|
||||
*WindowRect = Wnd->WindowRect;
|
||||
*ClientRect = Wnd->ClientRect;
|
||||
*WindowRect = Wnd->rcWindow;
|
||||
*ClientRect = Wnd->rcClient;
|
||||
|
||||
if (!(WinPos->flags & SWP_NOSIZE))
|
||||
{
|
||||
|
@ -609,19 +609,19 @@ co_WinPosDoWinPosChanging(PWINDOW_OBJECT Window,
|
|||
X = WinPos->x;
|
||||
Y = WinPos->y;
|
||||
Parent = Window->Parent;
|
||||
if ((0 != (Wnd->Style & WS_CHILD)) && Parent)
|
||||
if ((0 != (Wnd->style & WS_CHILD)) && Parent)
|
||||
{
|
||||
X += Parent->Wnd->ClientRect.left;
|
||||
Y += Parent->Wnd->ClientRect.top;
|
||||
X += Parent->Wnd->rcClient.left;
|
||||
Y += Parent->Wnd->rcClient.top;
|
||||
}
|
||||
|
||||
WindowRect->left = X;
|
||||
WindowRect->top = Y;
|
||||
WindowRect->right += X - Wnd->WindowRect.left;
|
||||
WindowRect->bottom += Y - Wnd->WindowRect.top;
|
||||
WindowRect->right += X - Wnd->rcWindow.left;
|
||||
WindowRect->bottom += Y - Wnd->rcWindow.top;
|
||||
RECTL_vOffsetRect(ClientRect,
|
||||
X - Wnd->WindowRect.left,
|
||||
Y - Wnd->WindowRect.top);
|
||||
X - Wnd->rcWindow.left,
|
||||
Y - Wnd->rcWindow.top);
|
||||
}
|
||||
|
||||
WinPos->flags |= SWP_NOCLIENTMOVE | SWP_NOCLIENTSIZE;
|
||||
|
@ -701,7 +701,7 @@ WinPosDoOwnedPopups(HWND hWnd, HWND hWndInsertAfter)
|
|||
if (!(Wnd = UserGetWindowObject(List[i])))
|
||||
continue;
|
||||
|
||||
if ((Wnd->Wnd->Style & WS_POPUP) &&
|
||||
if ((Wnd->Wnd->style & WS_POPUP) &&
|
||||
UserGetWindow(List[i], GW_OWNER) == hWnd)
|
||||
{
|
||||
USER_REFERENCE_ENTRY Ref;
|
||||
|
@ -735,15 +735,15 @@ WinPosInternalMoveWindow(PWINDOW_OBJECT Window, INT MoveX, INT MoveY)
|
|||
|
||||
ASSERT(Window != Window->FirstChild);
|
||||
|
||||
Window->Wnd->WindowRect.left += MoveX;
|
||||
Window->Wnd->WindowRect.right += MoveX;
|
||||
Window->Wnd->WindowRect.top += MoveY;
|
||||
Window->Wnd->WindowRect.bottom += MoveY;
|
||||
Window->Wnd->rcWindow.left += MoveX;
|
||||
Window->Wnd->rcWindow.right += MoveX;
|
||||
Window->Wnd->rcWindow.top += MoveY;
|
||||
Window->Wnd->rcWindow.bottom += MoveY;
|
||||
|
||||
Window->Wnd->ClientRect.left += MoveX;
|
||||
Window->Wnd->ClientRect.right += MoveX;
|
||||
Window->Wnd->ClientRect.top += MoveY;
|
||||
Window->Wnd->ClientRect.bottom += MoveY;
|
||||
Window->Wnd->rcClient.left += MoveX;
|
||||
Window->Wnd->rcClient.right += MoveX;
|
||||
Window->Wnd->rcClient.top += MoveY;
|
||||
Window->Wnd->rcClient.bottom += MoveY;
|
||||
|
||||
for(Child = Window->FirstChild; Child; Child = Child->NextSibling)
|
||||
{
|
||||
|
@ -764,7 +764,7 @@ WinPosFixupFlags(WINDOWPOS *WinPos, PWINDOW_OBJECT Window)
|
|||
|
||||
if (!Wnd) return FALSE;
|
||||
|
||||
if (Wnd->Style & WS_VISIBLE)
|
||||
if (Wnd->style & WS_VISIBLE)
|
||||
{
|
||||
WinPos->flags &= ~SWP_SHOWWINDOW;
|
||||
}
|
||||
|
@ -779,15 +779,15 @@ WinPosFixupFlags(WINDOWPOS *WinPos, PWINDOW_OBJECT Window)
|
|||
WinPos->cy = max(WinPos->cy, 0);
|
||||
|
||||
/* Check for right size */
|
||||
if (Wnd->WindowRect.right - Wnd->WindowRect.left == WinPos->cx &&
|
||||
Wnd->WindowRect.bottom - Wnd->WindowRect.top == WinPos->cy)
|
||||
if (Wnd->rcWindow.right - Wnd->rcWindow.left == WinPos->cx &&
|
||||
Wnd->rcWindow.bottom - Wnd->rcWindow.top == WinPos->cy)
|
||||
{
|
||||
WinPos->flags |= SWP_NOSIZE;
|
||||
}
|
||||
|
||||
/* Check for right position */
|
||||
if (Wnd->WindowRect.left == WinPos->x &&
|
||||
Wnd->WindowRect.top == WinPos->y)
|
||||
if (Wnd->rcWindow.left == WinPos->x &&
|
||||
Wnd->rcWindow.top == WinPos->y)
|
||||
{
|
||||
WinPos->flags |= SWP_NOMOVE;
|
||||
}
|
||||
|
@ -797,7 +797,7 @@ WinPosFixupFlags(WINDOWPOS *WinPos, PWINDOW_OBJECT Window)
|
|||
WinPos->flags |= SWP_NOACTIVATE; /* Already active */
|
||||
}
|
||||
else
|
||||
if ((Wnd->Style & (WS_POPUP | WS_CHILD)) != WS_CHILD)
|
||||
if ((Wnd->style & (WS_POPUP | WS_CHILD)) != WS_CHILD)
|
||||
{
|
||||
/* Bring to the top when activating */
|
||||
if (!(WinPos->flags & SWP_NOACTIVATE))
|
||||
|
@ -963,7 +963,7 @@ co_WinPosSetWindowPos(
|
|||
else if(VisRgn)
|
||||
{
|
||||
REGION_UnlockRgn(VisRgn);
|
||||
NtGdiOffsetRgn(VisBefore, -Window->Wnd->WindowRect.left, -Window->Wnd->WindowRect.top);
|
||||
NtGdiOffsetRgn(VisBefore, -Window->Wnd->rcWindow.left, -Window->Wnd->rcWindow.top);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1036,8 +1036,8 @@ co_WinPosSetWindowPos(
|
|||
|
||||
if (!Window->Wnd) return FALSE;
|
||||
|
||||
OldWindowRect = Window->Wnd->WindowRect;
|
||||
OldClientRect = Window->Wnd->ClientRect;
|
||||
OldWindowRect = Window->Wnd->rcWindow;
|
||||
OldClientRect = Window->Wnd->rcClient;
|
||||
|
||||
if (OldClientRect.bottom - OldClientRect.top ==
|
||||
NewClientRect.bottom - NewClientRect.top)
|
||||
|
@ -1061,29 +1061,29 @@ co_WinPosSetWindowPos(
|
|||
NewClientRect.top - OldClientRect.top);
|
||||
}
|
||||
|
||||
Window->Wnd->WindowRect = NewWindowRect;
|
||||
Window->Wnd->ClientRect = NewClientRect;
|
||||
Window->Wnd->rcWindow = NewWindowRect;
|
||||
Window->Wnd->rcClient = NewClientRect;
|
||||
|
||||
if (!(WinPos.flags & SWP_SHOWWINDOW) && (WinPos.flags & SWP_HIDEWINDOW))
|
||||
{
|
||||
/* Clear the update region */
|
||||
co_UserRedrawWindow(Window, NULL, 0, RDW_VALIDATE | RDW_NOFRAME |
|
||||
RDW_NOERASE | RDW_NOINTERNALPAINT | RDW_ALLCHILDREN);
|
||||
if ((Window->Wnd->Style & WS_VISIBLE) &&
|
||||
if ((Window->Wnd->style & WS_VISIBLE) &&
|
||||
Window->Parent == UserGetDesktopWindow())
|
||||
{
|
||||
co_IntShellHookNotify(HSHELL_WINDOWDESTROYED, (LPARAM)Window->hSelf);
|
||||
}
|
||||
Window->Wnd->Style &= ~WS_VISIBLE;
|
||||
Window->Wnd->style &= ~WS_VISIBLE;
|
||||
}
|
||||
else if (WinPos.flags & SWP_SHOWWINDOW)
|
||||
{
|
||||
if (!(Window->Wnd->Style & WS_VISIBLE) &&
|
||||
if (!(Window->Wnd->style & WS_VISIBLE) &&
|
||||
Window->Parent == UserGetDesktopWindow())
|
||||
{
|
||||
co_IntShellHookNotify(HSHELL_WINDOWCREATED, (LPARAM)Window->hSelf);
|
||||
}
|
||||
Window->Wnd->Style |= WS_VISIBLE;
|
||||
Window->Wnd->style |= WS_VISIBLE;
|
||||
}
|
||||
|
||||
if (Window->UpdateRegion != NULL && Window->UpdateRegion != (HRGN)1)
|
||||
|
@ -1111,7 +1111,7 @@ co_WinPosSetWindowPos(
|
|||
else if(VisRgn)
|
||||
{
|
||||
REGION_UnlockRgn(VisRgn);
|
||||
NtGdiOffsetRgn(VisAfter, -Window->Wnd->WindowRect.left, -Window->Wnd->WindowRect.top);
|
||||
NtGdiOffsetRgn(VisAfter, -Window->Wnd->rcWindow.left, -Window->Wnd->rcWindow.top);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1226,7 +1226,7 @@ co_WinPosSetWindowPos(
|
|||
if (RgnType != ERROR && RgnType != NULLREGION)
|
||||
{
|
||||
/* old code
|
||||
NtGdiOffsetRgn(DirtyRgn, Window->WindowRect.left, Window->WindowRect.top);
|
||||
NtGdiOffsetRgn(DirtyRgn, Window->rcWindow.left, Window->rcWindow.top);
|
||||
IntInvalidateWindows(Window, DirtyRgn,
|
||||
RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
|
||||
}
|
||||
|
@ -1236,11 +1236,11 @@ co_WinPosSetWindowPos(
|
|||
PWINDOW_OBJECT Parent = Window->Parent;
|
||||
|
||||
NtGdiOffsetRgn(DirtyRgn,
|
||||
Window->Wnd->WindowRect.left,
|
||||
Window->Wnd->WindowRect.top);
|
||||
if ((Window->Wnd->Style & WS_CHILD) &&
|
||||
Window->Wnd->rcWindow.left,
|
||||
Window->Wnd->rcWindow.top);
|
||||
if ((Window->Wnd->style & WS_CHILD) &&
|
||||
(Parent) &&
|
||||
!(Parent->Wnd->Style & WS_CLIPCHILDREN))
|
||||
!(Parent->Wnd->style & WS_CLIPCHILDREN))
|
||||
{
|
||||
IntInvalidateWindows(Parent, DirtyRgn,
|
||||
RDW_ERASE | RDW_INVALIDATE);
|
||||
|
@ -1287,7 +1287,7 @@ co_WinPosSetWindowPos(
|
|||
|
||||
if (!(WinPos.flags & SWP_NOACTIVATE))
|
||||
{
|
||||
if ((Window->Wnd->Style & (WS_CHILD | WS_POPUP)) == WS_CHILD)
|
||||
if ((Window->Wnd->style & (WS_CHILD | WS_POPUP)) == WS_CHILD)
|
||||
{
|
||||
co_IntSendMessage(WinPos.hwnd, WM_CHILDACTIVATE, 0, 0);
|
||||
}
|
||||
|
@ -1334,7 +1334,7 @@ co_WinPosShowWindow(PWINDOW_OBJECT Window, INT Cmd)
|
|||
|
||||
if (!Wnd) return FALSE;
|
||||
|
||||
WasVisible = (Wnd->Style & WS_VISIBLE) != 0;
|
||||
WasVisible = (Wnd->style & WS_VISIBLE) != 0;
|
||||
|
||||
switch (Cmd)
|
||||
{
|
||||
|
@ -1359,7 +1359,7 @@ co_WinPosShowWindow(PWINDOW_OBJECT Window, INT Cmd)
|
|||
case SW_MINIMIZE:
|
||||
{
|
||||
Swp |= SWP_NOACTIVATE;
|
||||
if (!(Wnd->Style & WS_MINIMIZE))
|
||||
if (!(Wnd->style & WS_MINIMIZE))
|
||||
{
|
||||
Swp |= co_WinPosMinMaximize(Window, SW_MINIMIZE, &NewPos) |
|
||||
SWP_FRAMECHANGED;
|
||||
|
@ -1378,7 +1378,7 @@ co_WinPosShowWindow(PWINDOW_OBJECT Window, INT Cmd)
|
|||
case SW_SHOWMAXIMIZED:
|
||||
{
|
||||
Swp |= SWP_SHOWWINDOW;
|
||||
if (!(Wnd->Style & WS_MAXIMIZE))
|
||||
if (!(Wnd->style & WS_MAXIMIZE))
|
||||
{
|
||||
Swp |= co_WinPosMinMaximize(Window, SW_MAXIMIZE, &NewPos) |
|
||||
SWP_FRAMECHANGED;
|
||||
|
@ -1411,7 +1411,7 @@ co_WinPosShowWindow(PWINDOW_OBJECT Window, INT Cmd)
|
|||
case SW_SHOWDEFAULT:
|
||||
case SW_RESTORE:
|
||||
Swp |= SWP_SHOWWINDOW;
|
||||
if (Wnd->Style & (WS_MINIMIZE | WS_MAXIMIZE))
|
||||
if (Wnd->style & (WS_MINIMIZE | WS_MAXIMIZE))
|
||||
{
|
||||
Swp |= co_WinPosMinMaximize(Window, SW_RESTORE, &NewPos) |
|
||||
SWP_FRAMECHANGED;
|
||||
|
@ -1435,7 +1435,7 @@ co_WinPosShowWindow(PWINDOW_OBJECT Window, INT Cmd)
|
|||
}
|
||||
|
||||
/* We can't activate a child window */
|
||||
if ((Wnd->Style & WS_CHILD) &&
|
||||
if ((Wnd->style & WS_CHILD) &&
|
||||
!(Wnd->ExStyle & WS_EX_MDICHILD))
|
||||
{
|
||||
Swp |= SWP_NOACTIVATE | SWP_NOZORDER;
|
||||
|
@ -1480,30 +1480,30 @@ co_WinPosShowWindow(PWINDOW_OBJECT Window, INT Cmd)
|
|||
WPARAM wParam = SIZE_RESTORED;
|
||||
|
||||
Window->Flags &= ~WINDOWOBJECT_NEED_SIZE;
|
||||
if (Wnd->Style & WS_MAXIMIZE)
|
||||
if (Wnd->style & WS_MAXIMIZE)
|
||||
{
|
||||
wParam = SIZE_MAXIMIZED;
|
||||
}
|
||||
else if (Wnd->Style & WS_MINIMIZE)
|
||||
else if (Wnd->style & WS_MINIMIZE)
|
||||
{
|
||||
wParam = SIZE_MINIMIZED;
|
||||
}
|
||||
|
||||
co_IntSendMessage(Window->hSelf, WM_SIZE, wParam,
|
||||
MAKELONG(Wnd->ClientRect.right -
|
||||
Wnd->ClientRect.left,
|
||||
Wnd->ClientRect.bottom -
|
||||
Wnd->ClientRect.top));
|
||||
MAKELONG(Wnd->rcClient.right -
|
||||
Wnd->rcClient.left,
|
||||
Wnd->rcClient.bottom -
|
||||
Wnd->rcClient.top));
|
||||
co_IntSendMessage(Window->hSelf, WM_MOVE, 0,
|
||||
MAKELONG(Wnd->ClientRect.left,
|
||||
Wnd->ClientRect.top));
|
||||
MAKELONG(Wnd->rcClient.left,
|
||||
Wnd->rcClient.top));
|
||||
IntEngWindowChanged(Window, WOC_RGN_CLIENT);
|
||||
|
||||
}
|
||||
|
||||
/* Activate the window if activation is not requested and the window is not minimized */
|
||||
/*
|
||||
if (!(Swp & (SWP_NOACTIVATE | SWP_HIDEWINDOW)) && !(Window->Style & WS_MINIMIZE))
|
||||
if (!(Swp & (SWP_NOACTIVATE | SWP_HIDEWINDOW)) && !(Window->style & WS_MINIMIZE))
|
||||
{
|
||||
WinPosChangeActiveWindow(Wnd, FALSE);
|
||||
}
|
||||
|
@ -1525,14 +1525,14 @@ PWINDOW_OBJECT child_window_from_point(PWINDOW_OBJECT parent, int x, int y )
|
|||
if (!IntPtInWindow( Wnd, x, y )) continue; /* skip it */
|
||||
|
||||
/* if window is minimized or disabled, return at once */
|
||||
if (Wnd->Style & (WS_MINIMIZE|WS_DISABLED)) return Wnd;
|
||||
if (Wnd->style & (WS_MINIMIZE|WS_DISABLED)) return Wnd;
|
||||
|
||||
/* if point is not in client area, return at once */
|
||||
if (x < Wnd->ClientRect.left || x >= Wnd->ClientRect.right ||
|
||||
y < Wnd->ClientRect.top || y >= Wnd->ClientRect.bottom)
|
||||
if (x < Wnd->rcClient.left || x >= Wnd->rcClient.right ||
|
||||
y < Wnd->rcClient.top || y >= Wnd->rcClient.bottom)
|
||||
return Wnd;
|
||||
|
||||
return child_window_from_point( Wnd, x - Wnd->ClientRect.left, y - Wnd->ClientRect.top );
|
||||
return child_window_from_point( Wnd, x - Wnd->rcClient.left, y - Wnd->rcClient.top );
|
||||
}
|
||||
return parent; /* not found any child */
|
||||
}
|
||||
|
@ -1567,12 +1567,12 @@ co_WinPosSearchChildren(
|
|||
continue;
|
||||
CurrentWnd = Current->Wnd;
|
||||
|
||||
if (!(CurrentWnd->Style & WS_VISIBLE))
|
||||
if (!(CurrentWnd->style & WS_VISIBLE))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((CurrentWnd->Style & (WS_POPUP | WS_CHILD | WS_DISABLED)) ==
|
||||
if ((CurrentWnd->style & (WS_POPUP | WS_CHILD | WS_DISABLED)) ==
|
||||
(WS_CHILD | WS_DISABLED))
|
||||
{
|
||||
continue;
|
||||
|
@ -1587,13 +1587,13 @@ co_WinPosSearchChildren(
|
|||
*Window = Current;
|
||||
UserReferenceObject(*Window);
|
||||
|
||||
if (CurrentWnd->Style & WS_MINIMIZE)
|
||||
if (CurrentWnd->style & WS_MINIMIZE)
|
||||
{
|
||||
*HitTest = HTCAPTION;
|
||||
break;
|
||||
}
|
||||
|
||||
if (CurrentWnd->Style & WS_DISABLED)
|
||||
if (CurrentWnd->style & WS_DISABLED)
|
||||
{
|
||||
*HitTest = HTERROR;
|
||||
break;
|
||||
|
@ -1614,10 +1614,10 @@ co_WinPosSearchChildren(
|
|||
else
|
||||
*HitTest = HTCLIENT;
|
||||
|
||||
if (Point->x >= CurrentWnd->ClientRect.left &&
|
||||
Point->x < CurrentWnd->ClientRect.right &&
|
||||
Point->y >= CurrentWnd->ClientRect.top &&
|
||||
Point->y < CurrentWnd->ClientRect.bottom)
|
||||
if (Point->x >= CurrentWnd->rcClient.left &&
|
||||
Point->x < CurrentWnd->rcClient.right &&
|
||||
Point->y >= CurrentWnd->rcClient.top &&
|
||||
Point->y < CurrentWnd->rcClient.bottom)
|
||||
{
|
||||
co_WinPosSearchChildren(Current, OnlyHitTests, Point, Window, HitTest);
|
||||
}
|
||||
|
@ -1650,7 +1650,7 @@ co_WinPosWindowFromPoint(PWINDOW_OBJECT ScopeWin, PUSER_MESSAGE_QUEUE OnlyHitTes
|
|||
return(HTERROR);
|
||||
}
|
||||
|
||||
if (ScopeWin->Wnd->Style & WS_DISABLED)
|
||||
if (ScopeWin->Wnd->style & WS_DISABLED)
|
||||
{
|
||||
return(HTERROR);
|
||||
}
|
||||
|
@ -1660,8 +1660,8 @@ co_WinPosWindowFromPoint(PWINDOW_OBJECT ScopeWin, PUSER_MESSAGE_QUEUE OnlyHitTes
|
|||
if((DesktopWindowHandle != ScopeWin->hSelf) &&
|
||||
(DesktopWindow = UserGetWindowObject(DesktopWindowHandle)))
|
||||
{
|
||||
Point.x += ScopeWin->Wnd->ClientRect.left - DesktopWindow->Wnd->ClientRect.left;
|
||||
Point.y += ScopeWin->Wnd->ClientRect.top - DesktopWindow->Wnd->ClientRect.top;
|
||||
Point.x += ScopeWin->Wnd->rcClient.left - DesktopWindow->Wnd->rcClient.left;
|
||||
Point.y += ScopeWin->Wnd->rcClient.top - DesktopWindow->Wnd->rcClient.top;
|
||||
}
|
||||
|
||||
HitTest = HTNOWHERE;
|
||||
|
@ -1698,10 +1698,10 @@ NtUserGetMinMaxInfo(
|
|||
UserRefObjectCo(Window, &Ref);
|
||||
Wnd = Window->Wnd;
|
||||
|
||||
Size.x = Window->Wnd->WindowRect.left;
|
||||
Size.y = Window->Wnd->WindowRect.top;
|
||||
Size.x = Window->Wnd->rcWindow.left;
|
||||
Size.y = Window->Wnd->rcWindow.top;
|
||||
WinPosInitInternalPos(Window, &Size,
|
||||
&Wnd->WindowRect);
|
||||
&Wnd->rcWindow);
|
||||
|
||||
if(SendMessage)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue