mirror of
https://github.com/reactos/reactos.git
synced 2024-09-09 20:30:04 +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
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* 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
|
* PROJECT: ReactOS user32.dll
|
||||||
* FILE: lib/user32/windows/input.c
|
* FILE: lib/user32/windows/input.c
|
||||||
|
@ -1805,16 +1805,9 @@ WINBOOL INTERNAL_DrawState(
|
||||||
UINT fuFlags,
|
UINT fuFlags,
|
||||||
BOOL unicode)
|
BOOL unicode)
|
||||||
{
|
{
|
||||||
// AG: Experimental, unfinished, and most likely buggy! I haven't been
|
UINT type;
|
||||||
// able to test this - my intention was to implement some things needed
|
UINT state;
|
||||||
// by the button control.
|
INT len;
|
||||||
|
|
||||||
if ((! lpOutputFunc) && (fuFlags & DST_COMPLEX))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
UINT type = fuFlags & 0xf; // DST_xxx
|
|
||||||
UINT state = fuFlags & 0x7ff0; // DSS_xxx
|
|
||||||
INT len = wData; // Data length
|
|
||||||
RECT rect;
|
RECT rect;
|
||||||
UINT dtflags = DT_NOCLIP; // Flags for DrawText
|
UINT dtflags = DT_NOCLIP; // Flags for DrawText
|
||||||
BOOL retval = FALSE; // Return value
|
BOOL retval = FALSE; // Return value
|
||||||
|
@ -1829,6 +1822,17 @@ WINBOOL INTERNAL_DrawState(
|
||||||
HBRUSH OldBrush = NULL, // Old brush (for MemDC)
|
HBRUSH OldBrush = NULL, // Old brush (for MemDC)
|
||||||
TempBrush = NULL; // Temporary 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);
|
DbgPrint("Entered DrawState, fuFlags %d, type %d, state %d\n", fuFlags, type, state);
|
||||||
|
|
||||||
if ((type == DST_TEXT || type == DST_PREFIXTEXT) && ! len)
|
if ((type == DST_TEXT || type == DST_PREFIXTEXT) && ! len)
|
||||||
|
@ -1852,9 +1856,10 @@ WINBOOL INTERNAL_DrawState(
|
||||||
case DST_TEXT :
|
case DST_TEXT :
|
||||||
case DST_PREFIXTEXT :
|
case DST_PREFIXTEXT :
|
||||||
{
|
{
|
||||||
|
BOOL success;
|
||||||
|
|
||||||
DbgPrint("DST_TEXT / DST_PREFIXTEXT\n");
|
DbgPrint("DST_TEXT / DST_PREFIXTEXT\n");
|
||||||
|
|
||||||
BOOL success;
|
|
||||||
if (unicode)
|
if (unicode)
|
||||||
success = GetTextExtentPoint32W(hdc, (LPWSTR) lData, len, &s);
|
success = GetTextExtentPoint32W(hdc, (LPWSTR) lData, len, &s);
|
||||||
else
|
else
|
||||||
|
@ -1938,10 +1943,14 @@ WINBOOL INTERNAL_DrawState(
|
||||||
// if (! BitBlt(MemDC, 0, 0, cx, cy, hdc, x, y, SRCCOPY)) goto cleanup;
|
// 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
|
// 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
|
||||||
BOOL TempResult = INTERNAL_DrawStateDraw(MemDC, type, lpOutputFunc, lData, wData, &rect, dtflags, unicode);
|
goto cleanup;
|
||||||
if (Font) SelectObject(MemDC, Font);
|
|
||||||
if (! TempResult) 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");
|
DbgPrint("Done drawing\n");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue