mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Added WindowFromDC() by Philip Alldredge
svn path=/trunk/; revision=5612
This commit is contained in:
parent
f8e97c4994
commit
e283c5b7d3
5 changed files with 25 additions and 6 deletions
|
@ -163,6 +163,7 @@ NtUserCallNoParam(
|
||||||
|
|
||||||
#define ONEPARAM_ROUTINE_GETMENU 0x01
|
#define ONEPARAM_ROUTINE_GETMENU 0x01
|
||||||
#define ONEPARAM_ROUTINE_ISWINDOWUNICODE 0x02
|
#define ONEPARAM_ROUTINE_ISWINDOWUNICODE 0x02
|
||||||
|
#define ONEPARAM_ROUTINE_WINDOWFROMDC 0x03
|
||||||
DWORD
|
DWORD
|
||||||
STDCALL
|
STDCALL
|
||||||
NtUserCallOneParam(
|
NtUserCallOneParam(
|
||||||
|
|
|
@ -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: dc.c,v 1.12 2003/07/10 21:04:31 chorns Exp $
|
/* $Id: dc.c,v 1.13 2003/08/17 09:17:04 weiden Exp $
|
||||||
*
|
*
|
||||||
* PROJECT: ReactOS user32.dll
|
* PROJECT: ReactOS user32.dll
|
||||||
* FILE: lib/user32/windows/input.c
|
* FILE: lib/user32/windows/input.c
|
||||||
|
@ -87,13 +87,12 @@ ReleaseDC(
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
HWND
|
HWND
|
||||||
STDCALL
|
STDCALL
|
||||||
WindowFromDC(
|
WindowFromDC(
|
||||||
HDC hDC)
|
HDC hDC)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
return (HWND)NtUserCallOneParam((DWORD)hDC, ONEPARAM_ROUTINE_WINDOWFROMDC);
|
||||||
return (HWND)0;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,5 +47,6 @@ HRGN STDCALL DceGetVisRgn(HWND hWnd, ULONG Flags, HWND hWndChild, ULONG CFlags)
|
||||||
INT FASTCALL DCE_ExcludeRgn(HDC, HWND, HRGN);
|
INT FASTCALL DCE_ExcludeRgn(HDC, HWND, HRGN);
|
||||||
BOOL FASTCALL DCE_InvalidateDCE(HWND, const PRECTL);
|
BOOL FASTCALL DCE_InvalidateDCE(HWND, const PRECTL);
|
||||||
BOOL FASTCALL DCE_InternalDelete(PDCE dce);
|
BOOL FASTCALL DCE_InternalDelete(PDCE dce);
|
||||||
|
HWND FASTCALL W32kWindowFromDC(HDC hDc);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: misc.c,v 1.4 2003/08/11 21:10:49 royce Exp $
|
/* $Id: misc.c,v 1.5 2003/08/17 09:17:04 weiden Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -13,6 +13,7 @@
|
||||||
#include <include/error.h>
|
#include <include/error.h>
|
||||||
#include <include/window.h>
|
#include <include/window.h>
|
||||||
#include <include/painting.h>
|
#include <include/painting.h>
|
||||||
|
#include <include/dce.h>
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
@ -68,6 +69,9 @@ NtUserCallOneParam(
|
||||||
Result = WindowObject->Unicode;
|
Result = WindowObject->Unicode;
|
||||||
W32kReleaseWindowObject(WindowObject);
|
W32kReleaseWindowObject(WindowObject);
|
||||||
return Result;
|
return Result;
|
||||||
|
|
||||||
|
case ONEPARAM_ROUTINE_WINDOWFROMDC:
|
||||||
|
return (DWORD)W32kWindowFromDC((HDC)Param);
|
||||||
|
|
||||||
}
|
}
|
||||||
DPRINT1("Calling invalid routine number 0x%x in NtUserCallOneParam()\n Param=0x%x\n",
|
DPRINT1("Calling invalid routine number 0x%x in NtUserCallOneParam()\n Param=0x%x\n",
|
||||||
|
|
|
@ -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: windc.c,v 1.19 2003/08/11 19:05:26 gdalsnes Exp $
|
/* $Id: windc.c,v 1.20 2003/08/17 09:17:04 weiden Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -467,6 +467,20 @@ DCE_InternalDelete(PDCE Dce)
|
||||||
|
|
||||||
return NULL != PrevInList;
|
return NULL != PrevInList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HWND FASTCALL
|
||||||
|
W32kWindowFromDC(HDC hDc)
|
||||||
|
{
|
||||||
|
DCE *Dce;
|
||||||
|
for (Dce = FirstDce; Dce != NULL; Dce = Dce->next)
|
||||||
|
{
|
||||||
|
if(Dce->hDC == hDc)
|
||||||
|
{
|
||||||
|
return Dce->hwndCurrent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
Loading…
Reference in a new issue