mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
* Implemented EnabledWindow and IsWindowEnabled (seem to work OK)
* Modified DrawState slightly (still doesn't work very well) svn path=/trunk/; revision=5622
This commit is contained in:
parent
04bd392176
commit
ff7ea1c1f5
4 changed files with 38 additions and 20 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: stubs.c,v 1.30 2003/08/14 20:25:52 royce Exp $
|
||||
/* $Id: stubs.c,v 1.31 2003/08/17 20:29:56 silverblade Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS user32.dll
|
||||
|
@ -220,19 +220,6 @@ GetSystemMenu(
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
WINBOOL
|
||||
STDCALL
|
||||
IsWindowEnabled(
|
||||
HWND hWnd)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
|
|
|
@ -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.21 2003/08/17 19:07:11 silverblade Exp $
|
||||
/* $Id: draw.c,v 1.22 2003/08/17 20:29:57 silverblade Exp $
|
||||
*
|
||||
* PROJECT: ReactOS user32.dll
|
||||
* FILE: lib/user32/windows/input.c
|
||||
|
@ -1616,11 +1616,15 @@ WINBOOL INTERNAL_DrawStateDraw(HDC hdc, UINT type, DRAWSTATEPROC lpOutputFunc,
|
|||
INT cx = rc->right - rc->left;
|
||||
INT cy = rc->bottom - rc->top;
|
||||
|
||||
if (((type == DST_TEXT) || (type == DST_PREFIXTEXT)) && (lpOutputFunc))
|
||||
type = DST_COMPLEX;
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case DST_TEXT :
|
||||
case DST_PREFIXTEXT :
|
||||
{
|
||||
DbgPrint("DST_TEXT\n");
|
||||
if (unicode)
|
||||
return DrawTextW(hdc, (LPWSTR)lData, (INT)wData, rc, dtflags);
|
||||
else
|
||||
|
@ -1641,10 +1645,12 @@ WINBOOL INTERNAL_DrawStateDraw(HDC hdc, UINT type, DRAWSTATEPROC lpOutputFunc,
|
|||
|
||||
case DST_COMPLEX :
|
||||
{
|
||||
DbgPrint("DST_COMPLEX\n");
|
||||
// Call lpOutputFunc, if necessary
|
||||
if (lpOutputFunc)
|
||||
{
|
||||
OffsetViewportOrgEx(hdc, rc->left, rc->top, NULL);
|
||||
DbgPrint("Calling lpOutputFunc\n");
|
||||
retval = lpOutputFunc(hdc, lData, wData, cx, cy);
|
||||
OffsetViewportOrgEx(hdc, -rc->left, -rc->top, NULL);
|
||||
return retval;
|
||||
|
@ -1769,9 +1775,12 @@ WINBOOL INTERNAL_DrawState(
|
|||
{
|
||||
DbgPrint("DSS_NORMAL\n");
|
||||
SetRect(&rect, x, y, x + cx, y + cy);
|
||||
DbgPrint("L == %d R == %d T == %d B == %d\n", rect.left, rect.right, rect.top, rect.bottom);
|
||||
return INTERNAL_DrawStateDraw(hdc, type, lpOutputFunc, lData, wData, &rect, dtflags, unicode);
|
||||
}
|
||||
|
||||
// WARNING: FROM THIS POINT ON THE CODE IS VERY BUGGY
|
||||
|
||||
// Set the rectangle to that of the memory DC
|
||||
SetRect(&rect, 0, 0, cx, cy);
|
||||
|
||||
|
|
|
@ -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: input.c,v 1.11 2003/08/04 16:56:40 gdalsnes Exp $
|
||||
/* $Id: input.c,v 1.12 2003/08/17 20:29:57 silverblade Exp $
|
||||
*
|
||||
* PROJECT: ReactOS user32.dll
|
||||
* FILE: lib/user32/windows/input.c
|
||||
|
@ -72,14 +72,20 @@ BlockInput(WINBOOL fBlockIt)
|
|||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
* @implemented
|
||||
*/
|
||||
WINBOOL STDCALL
|
||||
EnableWindow(HWND hWnd,
|
||||
WINBOOL bEnable)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return FALSE;
|
||||
LONG Style = GetWindowLongW(hWnd, GWL_STYLE);
|
||||
Style = bEnable ? Style & ~WS_DISABLED : Style | WS_DISABLED;
|
||||
SetWindowLongW(hWnd, GWL_STYLE, Style);
|
||||
|
||||
SendMessageA(hWnd, WM_ENABLE, (LPARAM) IsWindowEnabled(hWnd), 0);
|
||||
|
||||
// Return nonzero if it was disabled, or zero if it wasn't:
|
||||
return IsWindowEnabled(hWnd);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: window.c,v 1.61 2003/08/17 19:07:11 silverblade Exp $
|
||||
/* $Id: window.c,v 1.62 2003/08/17 20:29:57 silverblade Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS user32.dll
|
||||
|
@ -1287,6 +1287,22 @@ IsWindowVisible(HWND hWnd)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
WINBOOL
|
||||
STDCALL
|
||||
IsWindowEnabled(
|
||||
HWND hWnd)
|
||||
{
|
||||
// AG: I don't know if child windows are affected if the parent is
|
||||
// disabled. I think they stop processing messages but stay appearing
|
||||
// as enabled.
|
||||
|
||||
return (! (GetWindowLongW(hWnd, GWL_STYLE) & WS_DISABLED));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue