mirror of
https://github.com/reactos/reactos.git
synced 2024-08-07 19:58:21 +00:00
C89 compatibility
svn path=/trunk/; revision=5666
This commit is contained in:
parent
b3b09803f9
commit
5b43864d3d
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: draw.c,v 1.23 2003/08/18 00:14:50 silverblade Exp $
|
||||
/* $Id: draw.c,v 1.24 2003/08/19 03:05:42 royce Exp $
|
||||
*
|
||||
* PROJECT: ReactOS user32.dll
|
||||
* FILE: lib/user32/windows/input.c
|
||||
|
@ -1805,16 +1805,9 @@ WINBOOL INTERNAL_DrawState(
|
|||
UINT fuFlags,
|
||||
BOOL unicode)
|
||||
{
|
||||
// AG: Experimental, unfinished, and most likely buggy! I haven't been
|
||||
// able to test this - my intention was to implement some things needed
|
||||
// by the button control.
|
||||
|
||||
if ((! lpOutputFunc) && (fuFlags & DST_COMPLEX))
|
||||
return FALSE;
|
||||
|
||||
UINT type = fuFlags & 0xf; // DST_xxx
|
||||
UINT state = fuFlags & 0x7ff0; // DSS_xxx
|
||||
INT len = wData; // Data length
|
||||
UINT type;
|
||||
UINT state;
|
||||
INT len;
|
||||
RECT rect;
|
||||
UINT dtflags = DT_NOCLIP; // Flags for DrawText
|
||||
BOOL retval = FALSE; // Return value
|
||||
|
@ -1829,6 +1822,17 @@ WINBOOL INTERNAL_DrawState(
|
|||
HBRUSH OldBrush = NULL, // Old brush (for MemDC)
|
||||
TempBrush = NULL; // Temporary brush (for MemDC)
|
||||
|
||||
// AG: Experimental, unfinished, and most likely buggy! I haven't been
|
||||
// able to test this - my intention was to implement some things needed
|
||||
// by the button control.
|
||||
|
||||
if ((! lpOutputFunc) && (fuFlags & DST_COMPLEX))
|
||||
return FALSE;
|
||||
|
||||
type = fuFlags & 0xf; // DST_xxx
|
||||
state = fuFlags & 0x7ff0; // DSS_xxx
|
||||
len = wData; // Data length
|
||||
|
||||
DbgPrint("Entered DrawState, fuFlags %d, type %d, state %d\n", fuFlags, type, state);
|
||||
|
||||
if ((type == DST_TEXT || type == DST_PREFIXTEXT) && ! len)
|
||||
|
@ -1852,9 +1856,10 @@ WINBOOL INTERNAL_DrawState(
|
|||
case DST_TEXT :
|
||||
case DST_PREFIXTEXT :
|
||||
{
|
||||
BOOL success;
|
||||
|
||||
DbgPrint("DST_TEXT / DST_PREFIXTEXT\n");
|
||||
|
||||
BOOL success;
|
||||
if (unicode)
|
||||
success = GetTextExtentPoint32W(hdc, (LPWSTR) lData, len, &s);
|
||||
else
|
||||
|
@ -1938,10 +1943,14 @@ WINBOOL INTERNAL_DrawState(
|
|||
// if (! BitBlt(MemDC, 0, 0, cx, cy, hdc, x, y, SRCCOPY)) goto cleanup;
|
||||
|
||||
// DST_COMPLEX may draw text as well, so make sure font is selected
|
||||
if (! Font && (type <= DST_PREFIXTEXT)) goto cleanup; // THIS FAILS
|
||||
if (! Font && (type <= DST_PREFIXTEXT)) // THIS FAILS
|
||||
goto cleanup;
|
||||
|
||||
{
|
||||
BOOL TempResult = INTERNAL_DrawStateDraw(MemDC, type, lpOutputFunc, lData, wData, &rect, dtflags, unicode);
|
||||
if (Font) SelectObject(MemDC, Font);
|
||||
if (! TempResult) goto cleanup;
|
||||
}
|
||||
|
||||
DbgPrint("Done drawing\n");
|
||||
|
||||
|
|
Loading…
Reference in a new issue