- Fix CORE-6945.
- Miscellaneous adds and changes.
svn path=/trunk/; revision=60622
#define USER32_CALLBACK_CLIENTLOADLIBRARY (8)
#define USER32_CALLBACK_GETCHARSETINFO (9)
#define USER32_CALLBACK_COPYIMAGE (10)
-#define USER32_CALLBACK_MAXIMUM (10)
+#define USER32_CALLBACK_SETWNDICONS (11)
+#define USER32_CALLBACK_MAXIMUM (11)
typedef struct _WINDOWPROC_CALLBACK_ARGUMENTS
{
CHARSETINFO Cs;
} GET_CHARSET_INFO, *PGET_CHARSET_INFO;
+typedef struct _SETWNDICONS_CALLBACK_ARGUMENTS
+{
+ HICON hIconSmWindows;
+ HICON hIconWindows;
+} SETWNDICONS_CALLBACK_ARGUMENTS, *PSETWNDICONS_CALLBACK_ARGUMENTS;
+
NTSTATUS WINAPI
User32CallCopyImageFromKernel(PVOID Arguments, ULONG ArgumentLength);
NTSTATUS WINAPI
+User32CallSetWndIconsFromKernel(PVOID Arguments, ULONG ArgumentLength);
+NTSTATUS WINAPI
User32CallWindowProcFromKernel(PVOID Arguments, ULONG ArgumentLength);
NTSTATUS WINAPI
User32CallSendAsyncProcForKernel(PVOID Arguments, ULONG ArgumentLength);
ASSERT_PFN(QueryGlyphAttrs);
ASSERT_PFN(Notify);
ASSERT_PFN(SynchronizeSurface);
+ASSERT_PFN(ResetDevice);
#endif
UserThreadWOWInformation,
UserThreadHungStatus,
UserThreadInitiateShutdown,
+
UserThreadEndShutdown,
UserThreadUseActiveDesktop,
UserThreadUseDesktop,
HWND hTaskManWindow;
HWND hProgmanWindow;
HWND hShellWindow;
+ struct _WND * spwndShell;
PPROCESSINFO ppiShellProcess;
TEXTMETRICW tmSysFont;
DPISERVERINFO dpiSystem;
HICON hIconSmWindows;
- HICON hIcoWindows;
+ HICON hIconWindows;
DWORD dwKeyCache;
DWORD dwAsyncKeyCache;
ULONG cCaptures;
return Status;
}
-
HANDLE FASTCALL
co_IntCopyImage(HANDLE hnd, UINT type, INT desiredx, INT desiredy, UINT flags)
{
return TRUE;
}
+BOOL FASTCALL
+co_IntSetWndIcons(VOID)
+{
+ NTSTATUS Status;
+ ULONG ArgumentLength, ResultLength;
+ PVOID Argument, ResultPointer;
+ PSETWNDICONS_CALLBACK_ARGUMENTS Common;
+
+ ArgumentLength = ResultLength = 0;
+ Argument = ResultPointer = NULL;
+
+ ArgumentLength = sizeof(SETWNDICONS_CALLBACK_ARGUMENTS);
+
+ Argument = IntCbAllocateMemory(ArgumentLength);
+ if (NULL == Argument)
+ {
+ ERR("Set Window Icons callback failed: out of memory\n");
+ return FALSE;
+ }
+ Common = (PSETWNDICONS_CALLBACK_ARGUMENTS) Argument;
+
+ UserLeaveCo();
+
+ Status = KeUserModeCallback(USER32_CALLBACK_SETWNDICONS,
+ Argument,
+ ArgumentLength,
+ &ResultPointer,
+ &ResultLength);
+
+
+ UserEnterCo();
+
+ /* FIXME: Need to setup Registry System Cursor & Icons via Callbacks at init time! */
+ gpsi->hIconSmWindows = Common->hIconSmWindows;
+ gpsi->hIconWindows = Common->hIconWindows;
+
+ ERR("hIconSmWindows %p hIconWindows %p \n",gpsi->hIconSmWindows,gpsi->hIconWindows);
+
+ IntCbFreeMemory(Argument);
+
+ if (!NT_SUCCESS(Status))
+ {
+ ERR("Set Window Icons callback failed!\n");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
/* EOF */
co_IntGetCharsetInfo(LCID Locale, PCHARSETINFO pCs);
HANDLE FASTCALL co_IntCopyImage(HANDLE,UINT,INT,INT,UINT);
+
+BOOL FASTCALL co_IntSetWndIcons(VOID);
if (hIconSmIntern) Class->CSF_flags |= CSF_CACHEDSMICON;
//// FIXME: Very hacky here but it passes the tests....
- //// We should not kill a users handle!!!
- if (Class->hIconSm) IntClassDestroyIcon(Class->hIconSm); // Fixes 1013
Ret = 0; // Fixes 1009
}
Class->hIconSm = (HANDLE)NewLong;
BOOL Ansi)
{
LRESULT lResult = 0;
+ USER_REFERENCE_ENTRY Ref;
if (Msg > WM_USER) return 0;
case WM_CLIENTSHUTDOWN:
return IntClientShutdown(Wnd, wParam, lParam);
+ case WM_APPCOMMAND:
+ ERR("WM_APPCOMMAND\n");
+ if ( (Wnd->style & (WS_POPUP|WS_CHILD)) != WS_CHILD &&
+ Wnd != co_GetDesktopWindow(Wnd) )
+ {
+ if (!co_HOOK_CallHooks(WH_SHELL, HSHELL_APPCOMMAND, wParam, lParam))
+ co_IntShellHookNotify(HSHELL_APPCOMMAND, wParam, lParam);
+ break;
+ }
+ UserRefObjectCo(Wnd->spwndParent, &Ref);
+ lResult = co_IntSendMessage(UserHMGetHandle(Wnd->spwndParent), WM_APPCOMMAND, wParam, lParam);
+ UserDerefObjectCo(Wnd->spwndParent);
+ break;
+
case WM_CTLCOLORMSGBOX:
case WM_CTLCOLOREDIT:
case WM_CTLCOLORLISTBOX:
return lResult;
}
-static HICON NC_IconForWindow( PWND pWnd )
+HICON FASTCALL NC_IconForWindow( PWND pWnd )
{
HICON hIcon = 0;
+ // First thing to do, init the Window Logo icons.
+ if (!gpsi->hIconSmWindows) co_IntSetWndIcons();
- if (!pWnd->pcls || pWnd->fnid == FNID_DESKTOP) return hIcon;
+ if (!hIcon) hIcon = UserGetProp(pWnd, gpsi->atomIconSmProp);
+ if (!hIcon) hIcon = UserGetProp(pWnd, gpsi->atomIconProp);
if (!hIcon) hIcon = pWnd->pcls->hIconSm;
if (!hIcon) hIcon = pWnd->pcls->hIcon;
if (!hIcon && pWnd->style & DS_MODALFRAME)
- { // Fake it out for now, we use it as a test.
- hIcon = (HICON)1;
- /* FIXME: Need to setup Registry System Cursor & Icons via Callbacks at init time! */
+ {
if (!hIcon) hIcon = gpsi->hIconSmWindows; // Both are IDI_WINLOGO Small
- if (!hIcon) hIcon = gpsi->hIcoWindows; // Reg size.
+ if (!hIcon) hIcon = gpsi->hIconWindows; // Reg size.
+ hIcon = (HICON)1;
}
return hIcon;
}
if (!hIcon && pWnd)
{
- hIcon = pWnd->pcls->hIconSm; // FIXME: Windows does not do that
- if(!hIcon)
- hIcon = pWnd->pcls->hIcon;
+ hIcon = NC_IconForWindow( pWnd );
}
if (hIcon)
BOOL FASTCALL IntIsWindowDirty(PWND);
BOOL FASTCALL IntEndPaint(PWND,PPAINTSTRUCT);
HDC FASTCALL IntBeginPaint(PWND,PPAINTSTRUCT);
+HICON FASTCALL NC_IconForWindow( PWND );
return(NULL);
}
+HANDLE
+FASTCALL
+UserGetProp(PWND pWnd, ATOM Atom)
+{
+ PPROPERTY Prop;
+ Prop = IntGetProp(pWnd, Atom);
+ return Prop ? Prop->Data : NULL;
+}
+
BOOL FASTCALL
IntRemoveProp(PWND Window, ATOM Atom)
{
PPROPERTY FASTCALL IntGetProp(PWND,ATOM);
BOOL FASTCALL IntRemoveProp(PWND,ATOM);
BOOL FASTCALL IntSetProp(PWND, ATOM, HANDLE);
+HANDLE FASTCALL UserGetProp(PWND, ATOM);
PWND Child;
PMENU_OBJECT Menu;
BOOLEAN BelongsToThreadData;
+ PLIST_ENTRY ListEntry;
+ PPROPERTY Property;
ASSERT(Window);
IntUnlinkWindow(Window);
+ ListEntry = Window->PropListHead.Flink;
+ while (ListEntry != &Window->PropListHead)
+ {
+ Property = CONTAINING_RECORD(ListEntry, PROPERTY, PropListEntry);
+ ListEntry = ListEntry->Flink;
+ IntRemoveProp(Window, Property->Atom);
+ }
+
UserReferenceObject(Window);
UserDeleteObject(Window->head.h, TYPE_WINDOW);
extern RTL_CRITICAL_SECTION gcsUserApiHook;
extern USERAPIHOOK guah;
extern HINSTANCE ghmodUserApiHook;
+extern HICON hIconSmWindows, hIconWindows;
#define IS_ATOM(x) \
(((ULONG_PTR)(x) > 0x0) && ((ULONG_PTR)(x) < 0x10000))
HWND* WIN_ListChildren (HWND hWndparent);
VOID DeleteFrameBrushes(VOID);
BOOL WINAPI GdiValidateHandle(HGDIOBJ);
+HANDLE FASTCALL UserGetProp(HWND hWnd, ATOM Atom);
/* EOF */
ULONG_PTR g_ulSharedDelta;
BOOLEAN gfLogonProcess = FALSE;
BOOLEAN gfServerProcess = FALSE;
+HICON hIconSmWindows = NULL, hIconWindows = NULL;
WCHAR szAppInit[KEY_LENGTH];
User32CallClientLoadLibraryFromKernel,
User32CallGetCharsetInfo,
User32CallCopyImageFromKernel,
+ User32CallSetWndIconsFromKernel,
};
/*
return TRUE;
}
+
+VOID
+FASTCALL
+GetConnected(VOID)
+{
+ USERCONNECT UserCon;
+// ERR("GetConnected\n");
+
+ if ((PTHREADINFO)NtCurrentTeb()->Win32ThreadInfo == NULL)
+ NtUserGetThreadState(THREADSTATE_GETTHREADINFO);
+
+ if (gpsi && g_ppi) return;
+// FIXME HAX: Due to the "Dll Initialization Bug" we have to call this too.
+ GdiDllInitialize(NULL, DLL_PROCESS_ATTACH, NULL);
+
+ NtUserProcessConnect( NtCurrentProcess(),
+ &UserCon,
+ sizeof(USERCONNECT));
+
+ g_ppi = GetWin32ClientInfo()->ppi;
+ g_ulSharedDelta = UserCon.siClient.ulSharedDelta;
+ gpsi = SharedPtrToUser(UserCon.siClient.psi);
+ gHandleTable = SharedPtrToUser(UserCon.siClient.aheList);
+ gHandleEntries = SharedPtrToUser(gHandleTable->handles);
+
+}
+
NTSTATUS
WINAPI
User32CallClientThreadSetupFromKernel(PVOID Arguments, ULONG ArgumentLength)
{
- ERR("GetConnected\n");
+ ERR("ClientThreadSetup\n");
ClientThreadSetup();
return ZwCallbackReturn(NULL, 0, STATUS_SUCCESS);
}
return ZwCallbackReturn(Arguments, ArgumentLength, Ret ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL);
}
+
+NTSTATUS
+WINAPI
+User32CallSetWndIconsFromKernel(PVOID Arguments, ULONG ArgumentLength)
+{
+ PSETWNDICONS_CALLBACK_ARGUMENTS Common = Arguments;
+
+ if (!hIconSmWindows)
+ {
+ hIconSmWindows = LoadImageW(0, IDI_WINLOGO, IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);
+ hIconWindows = LoadImageW(0, IDI_WINLOGO, IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR);
+ }
+ Common->hIconSmWindows = hIconSmWindows;
+ Common->hIconWindows = hIconWindows;
+
+ return ZwCallbackReturn(Arguments, ArgumentLength, STATUS_SUCCESS);
+}
return TRUE;
}
+// WM_SETICON
+LRESULT FASTCALL
+DefWndSetIcon(PWND pWnd, WPARAM wParam, LPARAM lParam)
+{
+ HICON hIcon, hIconSmall, hIconOld;
+
+ if ( wParam > ICON_SMALL2 )
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return 0;
+ }
+ hIconSmall = UserGetProp(UserHMGetHandle(pWnd), gpsi->atomIconSmProp);
+ hIcon = UserGetProp(UserHMGetHandle(pWnd), gpsi->atomIconProp);
+
+ hIconOld = wParam == ICON_BIG ? hIcon : hIconSmall;
+
+ switch(wParam)
+ {
+ case ICON_BIG:
+ hIcon = (HICON)lParam;
+ break;
+ case ICON_SMALL:
+ hIconSmall = (HICON)lParam;
+ break;
+ case ICON_SMALL2:
+ ERR("FIXME: Set ICON_SMALL2 support!\n");
+ default:
+ break;
+ }
+
+ NtUserSetProp(UserHMGetHandle(pWnd), gpsi->atomIconProp, hIcon);
+ NtUserSetProp(UserHMGetHandle(pWnd), gpsi->atomIconSmProp, hIconSmall);
+
+ if ((pWnd->style & WS_CAPTION ) == WS_CAPTION)
+ DefWndNCPaint(UserHMGetHandle(pWnd), HRGN_WINDOW, -1); /* Repaint caption */
+
+ return (LRESULT)hIconOld;
+}
+
+LRESULT FASTCALL
+DefWndGetIcon(PWND pWnd, WPARAM wParam, LPARAM lParam)
+{
+ HICON hIconRet;
+ if ( wParam > ICON_SMALL2 )
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return 0;
+ }
+ switch(wParam)
+ {
+ case ICON_BIG:
+ hIconRet = UserGetProp(UserHMGetHandle(pWnd), gpsi->atomIconProp);
+ break;
+ case ICON_SMALL:
+ case ICON_SMALL2:
+ hIconRet = UserGetProp(UserHMGetHandle(pWnd), gpsi->atomIconSmProp);
+ break;
+ default:
+ break;
+ }
+ return (LRESULT)hIconRet;
+}
VOID FASTCALL
DefWndScreenshot(HWND hWnd)
case WM_SETICON:
{
- INT Index = (wParam != 0) ? GCL_HICON : GCL_HICONSM;
- HICON hOldIcon = (HICON)GetClassLongPtrW(hWnd, Index);
- SetClassLongPtrW(hWnd, Index, lParam);
- SetWindowPos(hWnd, 0, 0, 0, 0, 0,
- SWP_FRAMECHANGED | SWP_NOSIZE | SWP_NOMOVE |
- SWP_NOACTIVATE | SWP_NOZORDER);
- return ((LRESULT)hOldIcon);
+ return DefWndSetIcon(pWnd, wParam, lParam);
}
case WM_GETICON:
{
- INT Index = (wParam == ICON_BIG) ? GCL_HICON : GCL_HICONSM;
- return (GetClassLongPtrW(hWnd, Index));
+ return DefWndGetIcon(pWnd, wParam, lParam);
}
case WM_HELP:
#include <user32.h>
#include <wine/debug.h>
+WINE_DEFAULT_DEBUG_CHANNEL(user32);
#define HAS_DLGFRAME(Style, ExStyle) \
(((ExStyle) & WS_EX_DLGMODALFRAME) || \
SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL2, 0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR)&hIcon);
- if (!hIcon)
- SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL, 0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR)&hIcon);
-
- if (!hIcon)
- SendMessageTimeout(hwnd, WM_GETICON, ICON_BIG, 0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR)&hIcon);
-
- if (!hIcon)
- hIcon = (HICON)GetClassLongPtr(hwnd, GCL_HICONSM);
-
- if (!hIcon)
- hIcon = (HICON)GetClassLongPtr(hwnd, GCL_HICON);
-
+ if (!hIcon) hIcon = UserGetProp(hwnd, gpsi->atomIconSmProp);
+ if (!hIcon) hIcon = UserGetProp(hwnd, gpsi->atomIconProp);
+ if (!hIcon) hIcon = (HICON)GetClassLongPtr(hwnd, GCL_HICONSM);
+ if (!hIcon) hIcon = (HICON)GetClassLongPtr(hwnd, GCL_HICON);
+ if (!hIcon && (GetWindowLongW( hwnd, GWL_STYLE ) & DS_MODALFRAME))
+ {
+ if (!hIcon) hIcon = gpsi->hIconSmWindows; // Both are IDI_WINLOGO Small
+ if (!hIcon) hIcon = gpsi->hIconWindows; // Reg size.
+ }
return hIcon;
}
case HTBOTTOMLEFT:
case HTBOTTOMRIGHT:
{
+ /* Old comment:
+ * "make sure hittest fits into 0xf and doesn't overlap with HTSYSMENU"
+ * This was previously done by setting wParam=SC_SIZE + wParam - 2
+ */
+ /* But that is not what WinNT does. Instead it sends this. This
+ * is easy to differentiate from HTSYSMENU, because HTSYSMENU adds
+ * SC_MOUSEMENU into wParam.
+ */
SendMessageW(hWnd, WM_SYSCOMMAND, SC_SIZE + wParam - (HTLEFT - WMSZ_LEFT), lParam);
break;
}
return(0);
}
-VOID
-DefWndTrackScrollBar(HWND hWnd, WPARAM wParam, POINT Point)
+/***********************************************************************
+ * NC_HandleNCRButtonDown
+ *
+ * Handle a WM_NCRBUTTONDOWN message. Called from DefWindowProc().
+ */
+LRESULT NC_HandleNCRButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam )
{
- //INT ScrollBar;
+ MSG msg;
+ INT hittest = wParam;
- if ((wParam & 0xfff0) == SC_HSCROLL)
- {
- if ((wParam & 0x0f) != HTHSCROLL)
- return;
- //ScrollBar = SB_HORZ;
- }
- else
- {
- if ((wParam & 0x0f) != HTVSCROLL)
- return;
- //ScrollBar = SB_VERT;
- }
+ switch (hittest)
+ {
+ case HTCAPTION:
+ case HTSYSMENU:
+ if (!GetSystemMenu( hwnd, FALSE )) break;
+
+ SetCapture( hwnd );
+ for (;;)
+ {
+ if (!GetMessageW( &msg, 0, WM_MOUSEFIRST, WM_MOUSELAST )) break;
+ if (CallMsgFilterW( &msg, MSGF_MAX )) continue;
+ if (msg.message == WM_RBUTTONUP)
+ {
+ hittest = DefWndNCHitTest( hwnd, msg.pt );
+ break;
+ }
+ if (hwnd != GetCapture()) return 0;
+ }
+ ReleaseCapture();
+ if (hittest == HTCAPTION || hittest == HTSYSMENU)
+ {
+ ERR("Msg pt %x and Msg.lParam %x and lParam %x\n",MAKELONG(msg.pt.x,msg.pt.y),msg.lParam,lParam);
+ SendMessageW( hwnd, WM_SYSCOMMAND, SC_MOUSEMENU + HTSYSMENU, msg.lParam );
+ }
+ break;
+ }
+ return 0;
+}
+
+/***********************************************************************
+ * NcGetInsideRect
+ *
+ * Get the 'inside' rectangle of a window, i.e. the whole window rectangle
+ * but without the borders (if any).
+ * The rectangle is in window coordinates (for drawing with GetWindowDC()).
+ */
+static void FASTCALL
+NcGetInsideRect(HWND Wnd, RECT *Rect)
+{
+ DWORD Style;
+ DWORD ExStyle;
+
+ GetWindowRect(Wnd, Rect);
+ Rect->right = Rect->right - Rect->left;
+ Rect->left = 0;
+ Rect->bottom = Rect->bottom - Rect->top;
+ Rect->top = 0;
+
+ Style = GetWindowLongPtrW(Wnd, GWL_STYLE);
+ if (0 != (Style & WS_ICONIC))
+ {
+ return;
+ }
+
+ /* Remove frame from rectangle */
+ ExStyle = GetWindowLongPtrW(Wnd, GWL_EXSTYLE);
+ if (HAS_THICKFRAME(Style, ExStyle))
+ {
+ InflateRect(Rect, - GetSystemMetrics(SM_CXFRAME), - GetSystemMetrics(SM_CYFRAME));
+ }
+ else if (HAS_DLGFRAME(Style, ExStyle))
+ {
+ InflateRect(Rect, - GetSystemMetrics(SM_CXDLGFRAME), - GetSystemMetrics(SM_CYDLGFRAME));
+ }
+ else if (HAS_THINFRAME(Style, ExStyle))
+ {
+ InflateRect(Rect, - GetSystemMetrics(SM_CXBORDER), - GetSystemMetrics(SM_CYBORDER));
+ }
- /* FIXME */
+ /* We have additional border information if the window
+ * is a child (but not an MDI child) */
+ if (0 != (Style & WS_CHILD)
+ && 0 == (ExStyle & WS_EX_MDICHILD))
+ {
+ if (0 != (ExStyle & WS_EX_CLIENTEDGE))
+ {
+ InflateRect(Rect, - GetSystemMetrics(SM_CXEDGE), - GetSystemMetrics(SM_CYEDGE));
+ }
+ if (0 != (ExStyle & WS_EX_STATICEDGE))
+ {
+ InflateRect(Rect, - GetSystemMetrics(SM_CXBORDER), - GetSystemMetrics(SM_CYBORDER));
+ }
+ }
+}
+
+/***********************************************************************
+ * NcGetSysPopupPos
+ */
+void FASTCALL
+NcGetSysPopupPos(HWND Wnd, RECT *Rect)
+{
+ RECT WindowRect;
+
+ if (IsIconic(Wnd))
+ {
+ GetWindowRect(Wnd, Rect);
+ }
+ else
+ {
+ NcGetInsideRect(Wnd, Rect);
+ GetWindowRect(Wnd, &WindowRect);
+ OffsetRect(Rect, WindowRect.left, WindowRect.top);
+ if (0 != (GetWindowLongPtrW(Wnd, GWL_STYLE) & WS_CHILD))
+ {
+ ClientToScreen(GetParent(Wnd), (POINT *) Rect);
+ }
+ Rect->right = Rect->left + GetSystemMetrics(SM_CYCAPTION) - 1;
+ Rect->bottom = Rect->top + GetSystemMetrics(SM_CYCAPTION) - 1;
+ }
}
/* PUBLIC FUNCTIONS ***********************************************************/
}
return ret;
}
-
-/***********************************************************************
- * NcGetInsideRect
- *
- * Get the 'inside' rectangle of a window, i.e. the whole window rectangle
- * but without the borders (if any).
- * The rectangle is in window coordinates (for drawing with GetWindowDC()).
- */
-static void FASTCALL
-NcGetInsideRect(HWND Wnd, RECT *Rect)
-{
- DWORD Style;
- DWORD ExStyle;
-
- GetWindowRect(Wnd, Rect);
- Rect->right = Rect->right - Rect->left;
- Rect->left = 0;
- Rect->bottom = Rect->bottom - Rect->top;
- Rect->top = 0;
-
- Style = GetWindowLongPtrW(Wnd, GWL_STYLE);
- if (0 != (Style & WS_ICONIC))
- {
- return;
- }
-
- /* Remove frame from rectangle */
- ExStyle = GetWindowLongPtrW(Wnd, GWL_EXSTYLE);
- if (HAS_THICKFRAME(Style, ExStyle))
- {
- InflateRect(Rect, - GetSystemMetrics(SM_CXFRAME), - GetSystemMetrics(SM_CYFRAME));
- }
- else if (HAS_DLGFRAME(Style, ExStyle))
- {
- InflateRect(Rect, - GetSystemMetrics(SM_CXDLGFRAME), - GetSystemMetrics(SM_CYDLGFRAME));
- }
- else if (HAS_THINFRAME(Style, ExStyle))
- {
- InflateRect(Rect, - GetSystemMetrics(SM_CXBORDER), - GetSystemMetrics(SM_CYBORDER));
- }
-
- /* We have additional border information if the window
- * is a child (but not an MDI child) */
- if (0 != (Style & WS_CHILD)
- && 0 == (ExStyle & WS_EX_MDICHILD))
- {
- if (0 != (ExStyle & WS_EX_CLIENTEDGE))
- {
- InflateRect(Rect, - GetSystemMetrics(SM_CXEDGE), - GetSystemMetrics(SM_CYEDGE));
- }
- if (0 != (ExStyle & WS_EX_STATICEDGE))
- {
- InflateRect(Rect, - GetSystemMetrics(SM_CXBORDER), - GetSystemMetrics(SM_CYBORDER));
- }
- }
-}
-
-/***********************************************************************
- * NcGetSysPopupPos
- */
-void FASTCALL
-NcGetSysPopupPos(HWND Wnd, RECT *Rect)
-{
- RECT WindowRect;
-
- if (IsIconic(Wnd))
- {
- GetWindowRect(Wnd, Rect);
- }
- else
- {
- NcGetInsideRect(Wnd, Rect);
- GetWindowRect(Wnd, &WindowRect);
- OffsetRect(Rect, WindowRect.left, WindowRect.top);
- if (0 != (GetWindowLongPtrW(Wnd, GWL_STYLE) & WS_CHILD))
- {
- ClientToScreen(GetParent(Wnd), (POINT *) Rect);
- }
- Rect->right = Rect->left + GetSystemMetrics(SM_CYCAPTION) - 1;
- Rect->bottom = Rect->top + GetSystemMetrics(SM_CYCAPTION) - 1;
- }
-}
*/
/*
* PROJECT: ReactOS user32.dll
- * FILE: lib/user32/windows/input.c
- * PURPOSE: Input
+ * FILE: user/user32/windows/prop.c
+ * PURPOSE: Window Property
* PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
* UPDATE HISTORY:
* 09-05-2001 CSH Created
return NULL;
}
+HANDLE
+FASTCALL
+UserGetProp(HWND hWnd, ATOM Atom)
+{
+ PPROPERTY Prop;
+ Prop = IntGetProp(hWnd, Atom);
+ return Prop ? Prop->Data : NULL;
+}
/* FUNCTIONS *****************************************************************/