}
void
-UserGetInsideRectNC(PWINDOW Wnd, RECT *rect)
+UserGetInsideRectNC(PWND 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)
{
}
static LONG
-DefWndStartSizeMove(HWND hWnd, PWINDOW Wnd, WPARAM wParam, POINT *capturePoint)
+DefWndStartSizeMove(HWND hWnd, PWND Wnd, WPARAM wParam, POINT *capturePoint)
{
LONG hittest = 0;
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)
{
DWORD dwPoint = GetMessagePos();
BOOL DragFullWindows = FALSE;
HWND hWndParent = NULL;
- PWINDOW Wnd;
+ PWND Wnd;
Wnd = ValidateHwnd(hwnd);
if (!Wnd)
return;
- Style = Wnd->Style;
+ Style = Wnd->style;
ExStyle = Wnd->ExStyle;
iconic = (Style & WS_MINIMIZE) != 0;
/* Get min/max info */
WinPosGetMinMaxInfo(hwnd, NULL, NULL, &minTrack, &maxTrack);
- sizingRect = Wnd->WindowRect;
+ sizingRect = Wnd->rcWindow;
if (Style & WS_CHILD)
{
hWndParent = GetParent(hwnd);
* Client area
*/
if ( uFlags & PRF_CLIENT)
- SendMessageW(hwnd, WM_PRINTCLIENT, (WPARAM)hdc, PRF_CLIENT);
+ SendMessageW(hwnd, WM_PRINTCLIENT, (WPARAM)hdc, uFlags);
}
static BOOL CALLBACK
else
{
POINT Pt;
- DWORD Style;
+ LONG_PTR Style;
LONG HitCode;
Style = GetWindowLongPtrW(hWnd, GWL_STYLE);
case WM_SETREDRAW:
{
- DefWndSetRedraw(hWnd, wParam);
+ LONG_PTR Style = GetWindowLongPtrW(hWnd, GWL_STYLE);
+ if (wParam) SetWindowLongPtr(hWnd, GWL_STYLE, Style | WS_VISIBLE);
+ else
+ {
+ RedrawWindow(hWnd, NULL, 0, RDW_ALLCHILDREN | RDW_VALIDATE);
+ Style &= ~WS_VISIBLE;
+ SetWindowLongPtr(hWnd, GWL_STYLE, Style);
+ }
return (0);
}
case WM_SETCURSOR:
{
- ULONG Style = GetWindowLongPtrW(hWnd, GWL_STYLE);
+ LONG_PTR Style = GetWindowLongPtrW(hWnd, GWL_STYLE);
if (Style & WS_CHILD)
{
case WM_QUERYUISTATE:
{
LRESULT Ret = 0;
- PWINDOW Wnd = ValidateHwnd(hWnd);
+ PWND Wnd = ValidateHwnd(hWnd);
if (Wnd != NULL)
{
if (Wnd->HideFocus)
BOOL AlwaysShowCues = FALSE;
WORD Action = LOWORD(wParam);
WORD Flags = HIWORD(wParam);
- PWINDOW Wnd;
+ PWND Wnd;
SystemParametersInfoW(SPI_GETKEYBOARDCUES, 0, &AlwaysShowCues, 0);
if (AlwaysShowCues)
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((PWND)DesktopPtrToUser(Wnd->spwndParent));
}
else
{
BOOL AlwaysShowCues = FALSE;
WORD Action = LOWORD(wParam);
WORD Flags = HIWORD(wParam);
- PWINDOW Wnd;
+ PWND Wnd;
SystemParametersInfoW(SPI_GETKEYBOARDCUES, 0, &AlwaysShowCues, 0);
if (AlwaysShowCues)
LPARAM lParam)
{
LRESULT Result = 0;
- PWINDOW Wnd;
+ PWND Wnd;
SPY_EnterMessage(SPY_DEFWNDPROC, hWnd, Msg, wParam, lParam);
switch (Msg)
{
case WM_NCCREATE:
{
- LPCREATESTRUCTA cs = (LPCREATESTRUCTA)lParam;
- /* check for string, as static icons, bitmaps (SS_ICON, SS_BITMAP)
- * may have child window IDs instead of window name */
-
- DefSetText(hWnd, (PCWSTR)cs->lpszName, TRUE);
-
- Result = 1;
+ if (lParam)
+ {
+ LPCREATESTRUCTA cs = (LPCREATESTRUCTA)lParam;
+ /* check for string, as static icons, bitmaps (SS_ICON, SS_BITMAP)
+ * may have child window IDs instead of window name */
+ if (HIWORD(cs->lpszName))
+ {
+ DefSetText(hWnd, (PCWSTR)cs->lpszName, TRUE);
+ }
+ Result = 1;
+ }
break;
}
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;
}
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,
LPARAM lParam)
{
LRESULT Result = 0;
- PWINDOW Wnd;
+ PWND Wnd;
SPY_EnterMessage(SPY_DEFWNDPROC, hWnd, Msg, wParam, lParam);
switch (Msg)
{
case WM_NCCREATE:
{
- LPCREATESTRUCTW cs = (LPCREATESTRUCTW)lParam;
- /* check for string, as static icons, bitmaps (SS_ICON, SS_BITMAP)
- * may have child window IDs instead of window name */
+ if (lParam)
+ {
+ LPCREATESTRUCTW cs = (LPCREATESTRUCTW)lParam;
+ /* check for string, as static icons, bitmaps (SS_ICON, SS_BITMAP)
+ * may have child window IDs instead of window name */
- DefSetText(hWnd, cs->lpszName, FALSE);
- Result = 1;
+ if (HIWORD(cs->lpszName))
+ {
+ DefSetText(hWnd, cs->lpszName, FALSE);
+ }
+ Result = 1;
+ }
break;
}
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;
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));