Author: weiden
Date: Sat Sep 29 22:28:45 2007
New Revision: 29299
URL:
http://svn.reactos.org/svn/reactos?rev=29299&view=rev
Log:
Fix displaying the window caption height (SM_CYCAPTION includes SM_CYBORDER)
Modified:
trunk/reactos/dll/cpl/desk/preview.c
Modified: trunk/reactos/dll/cpl/desk/preview.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/preview.c?rev…
==============================================================================
--- trunk/reactos/dll/cpl/desk/preview.c (original)
+++ trunk/reactos/dll/cpl/desk/preview.c Sat Sep 29 22:28:45 2007
@@ -27,6 +27,7 @@
INT cySizeFrame;
INT cyCaption;
+ INT cyBorder;
INT cyMenu;
INT cxScrollbar;
@@ -159,6 +160,7 @@
pPreviewData->cyCaption = GetSystemMetrics(SM_CYCAPTION);
pPreviewData->cyMenu = GetSystemMetrics(SM_CYMENU);
pPreviewData->cxScrollbar = GetSystemMetrics(SM_CXVSCROLL);
+ pPreviewData->cyBorder = GetSystemMetrics(SM_CYBORDER);
/* load font info */
NonClientMetrics.cbSize = sizeof(NONCLIENTMETRICS);
@@ -207,7 +209,7 @@
pPreviewData->rcInactiveCaption.left = pPreviewData->rcInactiveFrame.left +
pPreviewData->cxEdge + pPreviewData->cySizeFrame + 1;
pPreviewData->rcInactiveCaption.top = pPreviewData->rcInactiveFrame.top +
pPreviewData->cyEdge + pPreviewData->cySizeFrame + 1;
pPreviewData->rcInactiveCaption.right = pPreviewData->rcInactiveFrame.right -
pPreviewData->cxEdge - pPreviewData->cySizeFrame - 1;
- pPreviewData->rcInactiveCaption.bottom = pPreviewData->rcInactiveCaption.top +
pPreviewData->cyCaption;
+ pPreviewData->rcInactiveCaption.bottom = pPreviewData->rcInactiveCaption.top +
pPreviewData->cyCaption - pPreviewData->cyBorder;
/* Calculate the inactive caption buttons rectangle */
pPreviewData->rcInactiveCaptionButtons.left =
pPreviewData->rcInactiveCaption.right - 2 - 2 - 3 * 16;
@@ -225,7 +227,7 @@
pPreviewData->rcActiveCaption.left = pPreviewData->rcActiveFrame.left +
pPreviewData->cxEdge + pPreviewData->cySizeFrame + 1;
pPreviewData->rcActiveCaption.top = pPreviewData->rcActiveFrame.top +
pPreviewData->cxEdge + pPreviewData->cySizeFrame + 1;
pPreviewData->rcActiveCaption.right = pPreviewData->rcActiveFrame.right -
pPreviewData->cxEdge - pPreviewData->cySizeFrame - 1;
- pPreviewData->rcActiveCaption.bottom = pPreviewData->rcActiveCaption.top +
pPreviewData->cyCaption;
+ pPreviewData->rcActiveCaption.bottom = pPreviewData->rcActiveCaption.top +
pPreviewData->cyCaption - pPreviewData->cyBorder;
/* Calculate the active caption buttons rectangle */
pPreviewData->rcActiveCaptionButtons.left = pPreviewData->rcActiveCaption.right
- 2 - 2 - 3 * 16;