mirror of
https://github.com/reactos/reactos.git
synced 2024-10-01 15:07:53 +00:00
[Win32k]
- Fix typo, see CORE-9989. - Add caption text is truncated flag support. svn path=/trunk/; revision=68622
This commit is contained in:
parent
085f7653ed
commit
3b0dfe2c25
|
@ -685,7 +685,7 @@ IntInvalidateWindows(PWND Wnd, PREGION Rgn, ULONG Flags)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RgnType == NULLREGION;
|
RgnType = NULLREGION;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1882,6 +1882,7 @@ UserDrawCaptionText(
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
BOOLEAN bDeleteFont = FALSE;
|
BOOLEAN bDeleteFont = FALSE;
|
||||||
SIZE Size;
|
SIZE Size;
|
||||||
|
BOOL Ret = TRUE;
|
||||||
ULONG fit = 0, Length;
|
ULONG fit = 0, Length;
|
||||||
WCHAR szText[128];
|
WCHAR szText[128];
|
||||||
RECTL r = *lpRc;
|
RECTL r = *lpRc;
|
||||||
|
@ -1942,6 +1943,7 @@ UserDrawCaptionText(
|
||||||
if (Text->Length/sizeof(WCHAR) > Length && Length > 3)
|
if (Text->Length/sizeof(WCHAR) > Length && Length > 3)
|
||||||
{
|
{
|
||||||
RtlCopyMemory(&szText[Length-3], ELLIPSISW, sizeof(ELLIPSISW));
|
RtlCopyMemory(&szText[Length-3], ELLIPSISW, sizeof(ELLIPSISW));
|
||||||
|
Ret = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
GreExtTextOutW( hDc,
|
GreExtTextOutW( hDc,
|
||||||
|
@ -1962,9 +1964,12 @@ UserDrawCaptionText(
|
||||||
if (bDeleteFont)
|
if (bDeleteFont)
|
||||||
GreDeleteObject(hFont);
|
GreDeleteObject(hFont);
|
||||||
|
|
||||||
return TRUE;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// This draws Buttons, Icons and Text...
|
||||||
|
//
|
||||||
BOOL UserDrawCaption(
|
BOOL UserDrawCaption(
|
||||||
PWND pWnd,
|
PWND pWnd,
|
||||||
HDC hDc,
|
HDC hDc,
|
||||||
|
@ -2087,17 +2092,25 @@ BOOL UserDrawCaption(
|
||||||
|
|
||||||
if((uFlags & DC_TEXT))
|
if((uFlags & DC_TEXT))
|
||||||
{
|
{
|
||||||
|
BOOL Set = FALSE;
|
||||||
Rect.left += 2;
|
Rect.left += 2;
|
||||||
|
|
||||||
if (Str)
|
if (Str)
|
||||||
UserDrawCaptionText(pWnd, hDc, Str, &Rect, uFlags, hFont);
|
Set = UserDrawCaptionText(pWnd, hDc, Str, &Rect, uFlags, hFont);
|
||||||
else if (pWnd != NULL) // FIXME: Windows does not do that
|
else if (pWnd != NULL) // FIXME: Windows does not do that
|
||||||
{
|
{
|
||||||
UNICODE_STRING ustr;
|
UNICODE_STRING ustr;
|
||||||
ustr.Buffer = pWnd->strName.Buffer; // FIXME: LARGE_STRING truncated!
|
ustr.Buffer = pWnd->strName.Buffer; // FIXME: LARGE_STRING truncated!
|
||||||
ustr.Length = (USHORT)min(pWnd->strName.Length, MAXUSHORT);
|
ustr.Length = (USHORT)min(pWnd->strName.Length, MAXUSHORT);
|
||||||
ustr.MaximumLength = (USHORT)min(pWnd->strName.MaximumLength, MAXUSHORT);
|
ustr.MaximumLength = (USHORT)min(pWnd->strName.MaximumLength, MAXUSHORT);
|
||||||
UserDrawCaptionText(pWnd, hDc, &ustr, &Rect, uFlags, hFont);
|
Set = UserDrawCaptionText(pWnd, hDc, &ustr, &Rect, uFlags, hFont);
|
||||||
|
}
|
||||||
|
if (pWnd)
|
||||||
|
{
|
||||||
|
if (Set)
|
||||||
|
pWnd->state2 &= ~WNDS2_CAPTIONTEXTTRUNCATED;
|
||||||
|
else
|
||||||
|
pWnd->state2 |= WNDS2_CAPTIONTEXTTRUNCATED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue