* Copyright (C) 2003 ReactOS Team
*
* This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
+ * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
+ * version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Library General Public
- * License along with this library; see the file COPYING.LIB.
- * If not, write to the Free Software Foundation,
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/* INCLUDES *******************************************************************/
}
ReleaseDC(hWnd, hDC);
+ DeleteObject(hRgn); // We use DCX_KEEPCLIPRGN
return 0;
}
/* PUBLIC FUNCTIONS ***********************************************************/
-/*
- * @implemented
- */
BOOL WINAPI
-AdjustWindowRectEx(LPRECT lpRect,
- DWORD dwStyle,
- BOOL bMenu,
- DWORD dwExStyle)
+RealAdjustWindowRectEx(LPRECT lpRect,
+ DWORD dwStyle,
+ BOOL bMenu,
+ DWORD dwExStyle)
{
SIZE BorderSize;
return TRUE;
}
+/*
+ * @implemented
+ */
+BOOL WINAPI
+AdjustWindowRectEx(LPRECT lpRect,
+ DWORD dwStyle,
+ BOOL bMenu,
+ DWORD dwExStyle)
+{
+ BOOL Hook, Ret = FALSE;
+
+ LOADUSERAPIHOOK
+
+ Hook = BeginIfHookedUserApiHook();
+
+ /* Bypass SEH and go direct. */
+ if (!Hook) return RealAdjustWindowRectEx(lpRect, dwStyle, bMenu, dwExStyle);
+
+ _SEH2_TRY
+ {
+ Ret = guah.AdjustWindowRectEx(lpRect, dwStyle, bMenu, dwExStyle);
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ }
+ _SEH2_END;
+
+ EndUserApiHook();
+
+ return Ret;
+}
+
/*
* @implemented
BOOL WINAPI
DrawCaption(HWND hWnd, HDC hDC, LPCRECT lprc, UINT uFlags)
{
- return NtUserDrawCaption(hWnd, hDC, lprc, uFlags);
+ BOOL Hook, Ret = FALSE;
+
+ LOADUSERAPIHOOK
+
+ Hook = BeginIfHookedUserApiHook();
+
+ /* Bypass SEH and go direct. */
+ if (!Hook) return NtUserDrawCaption(hWnd, hDC, lprc, uFlags);
+
+ _SEH2_TRY
+ {
+ Ret = guah.DrawCaption(hWnd, hDC, lprc, uFlags);
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ }
+ _SEH2_END;
+
+ EndUserApiHook();
+
+ return Ret;
}
/*