mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
don't draw caption icon if not needed
svn path=/trunk/; revision=6270
This commit is contained in:
parent
58c18026cc
commit
511fc18181
1 changed files with 5 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: defwnd.c,v 1.96 2003/10/07 22:06:52 gvg Exp $
|
||||
/* $Id: defwnd.c,v 1.97 2003/10/08 13:46:34 weiden Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS user32.dll
|
||||
|
@ -477,6 +477,8 @@ DrawCaption(
|
|||
if (! PatBlt(MemDC, 0, 0, lprc->right - lprc->left, lprc->bottom - lprc->top, PATCOPY )) goto cleanup;
|
||||
}
|
||||
|
||||
Style = GetWindowLongW(hWnd, GWL_STYLE);
|
||||
|
||||
/* Windows behaves like this */
|
||||
Height = GetSystemMetrics(SM_CYCAPTION) - 1;
|
||||
|
||||
|
@ -488,7 +490,7 @@ DrawCaption(
|
|||
r.top = Padding;
|
||||
r.bottom = r.top + (Height / 2);
|
||||
|
||||
if (uFlags & DC_ICON)
|
||||
if ((uFlags & DC_ICON) && (Style & WS_SYSMENU))
|
||||
{
|
||||
// For some reason the icon isn't centered correctly...
|
||||
r.top --;
|
||||
|
@ -508,7 +510,7 @@ DrawCaption(
|
|||
|
||||
r.right = (lprc->right - lprc->left);
|
||||
ButtonWidth = GetSystemMetrics(SM_CXSIZE) - 2;
|
||||
Style = GetWindowLongW(hWnd, GWL_STYLE);
|
||||
|
||||
if (Style & WS_SYSMENU)
|
||||
{
|
||||
r.right -= 3 + ButtonWidth;
|
||||
|
|
Loading…
Reference in a new issue