mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
Fix caption text width
svn path=/trunk/; revision=6037
This commit is contained in:
parent
5e5352278f
commit
2d66ad555c
1 changed files with 12 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: defwnd.c,v 1.85 2003/09/09 09:39:21 gvg Exp $
|
||||
/* $Id: defwnd.c,v 1.86 2003/09/10 18:18:25 gvg Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS user32.dll
|
||||
|
@ -419,6 +419,7 @@ DrawCaption(
|
|||
HFONT hOldFont = NULL;
|
||||
HBRUSH OldBrush = NULL;
|
||||
HDC MemDC = NULL;
|
||||
int ButtonWidth;
|
||||
|
||||
#ifdef DOUBLE_BUFFER_CAPTION
|
||||
HBITMAP MemBMP = NULL, OldBMP = NULL;
|
||||
|
@ -486,6 +487,16 @@ DrawCaption(
|
|||
r.left += GetSystemMetrics(SM_CXSIZE) + Padding;
|
||||
|
||||
r.right = (lprc->right - lprc->left);
|
||||
ButtonWidth = GetSystemMetrics(SM_CXSIZE) - 2;
|
||||
if (GetWindowLongW(hWnd, GWL_STYLE) & WS_SYSMENU)
|
||||
{
|
||||
r.right -= 3 + ButtonWidth;
|
||||
if (! (GetWindowLongW(hWnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW))
|
||||
{
|
||||
r.right -= 2 + 2 * ButtonWidth;
|
||||
}
|
||||
}
|
||||
r.right -= 2;
|
||||
|
||||
nclm.cbSize = sizeof(nclm);
|
||||
if (! SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSW), &nclm, 0)) goto cleanup;
|
||||
|
|
Loading…
Reference in a new issue