mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Implemented SetWindowContextHelpId() and GetWindowContextHelpId()
svn path=/trunk/; revision=5630
This commit is contained in:
parent
cfac33ce3b
commit
a234963ccf
5 changed files with 44 additions and 8 deletions
|
@ -164,6 +164,7 @@ NtUserCallNoParam(
|
|||
#define ONEPARAM_ROUTINE_GETMENU 0x01
|
||||
#define ONEPARAM_ROUTINE_ISWINDOWUNICODE 0x02
|
||||
#define ONEPARAM_ROUTINE_WINDOWFROMDC 0x03
|
||||
#define ONEPARAM_ROUTINE_GETWNDCONTEXTHLPID 0x04
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserCallOneParam(
|
||||
|
@ -175,6 +176,7 @@ NtUserCallOneParam(
|
|||
#define TWOPARAM_ROUTINE_SHOWOWNEDPOPUPS 0x55
|
||||
#define TWOPARAM_ROUTINE_SWITCHTOTHISWINDOW 0x56
|
||||
#define TWOPARAM_ROUTINE_VALIDATERGN 0x57
|
||||
#define TWOPARAM_ROUTINE_SETWNDCONTEXTHLPID 0x58
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserCallTwoParam(
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: window.c,v 1.64 2003/08/17 23:48:36 weiden Exp $
|
||||
/* $Id: window.c,v 1.65 2003/08/18 00:11:17 weiden Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS user32.dll
|
||||
|
@ -1614,25 +1614,27 @@ ClientToScreen(HWND hWnd, LPPOINT lpPoint)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
WINBOOL
|
||||
STDCALL
|
||||
SetWindowContextHelpId(HWND hwnd,
|
||||
DWORD dwContextHelpId)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return(FALSE);
|
||||
return (WINBOOL)NtUserCallTwoParam((DWORD)hwnd, (DWORD)dwContextHelpId,
|
||||
TWOPARAM_ROUTINE_SETWNDCONTEXTHLPID);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
* @implemented
|
||||
*/
|
||||
DWORD
|
||||
STDCALL
|
||||
GetWindowContextHelpId(HWND hwnd)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return(0);
|
||||
return NtUserCallOneParam((DWORD)hwnd, ONEPARAM_ROUTINE_GETWNDCONTEXTHLPID);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -37,6 +37,8 @@ typedef struct _WINDOW_OBJECT
|
|||
INT y;
|
||||
INT Width;
|
||||
INT Height;
|
||||
/* Context help id */
|
||||
DWORD ContextHelpId;
|
||||
/* Parent window handle. */
|
||||
HWND ParentHandle;
|
||||
/* Window menu handle. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: misc.c,v 1.5 2003/08/17 09:17:04 weiden Exp $
|
||||
/* $Id: misc.c,v 1.6 2003/08/18 00:11:17 weiden Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -55,7 +55,9 @@ NtUserCallOneParam(
|
|||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Result = (DWORD)WindowObject->Menu;
|
||||
|
||||
W32kReleaseWindowObject(WindowObject);
|
||||
return Result;
|
||||
|
||||
|
@ -73,6 +75,19 @@ NtUserCallOneParam(
|
|||
case ONEPARAM_ROUTINE_WINDOWFROMDC:
|
||||
return (DWORD)W32kWindowFromDC((HDC)Param);
|
||||
|
||||
case ONEPARAM_ROUTINE_GETWNDCONTEXTHLPID:
|
||||
WindowObject = W32kGetWindowObject((HWND)Param);
|
||||
if(!WindowObject)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Result = WindowObject->ContextHelpId;
|
||||
|
||||
W32kReleaseWindowObject(WindowObject);
|
||||
return Result;
|
||||
|
||||
}
|
||||
DPRINT1("Calling invalid routine number 0x%x in NtUserCallOneParam()\n Param=0x%x\n",
|
||||
Routine, Param);
|
||||
|
@ -88,6 +103,7 @@ NtUserCallTwoParam(
|
|||
DWORD Param2,
|
||||
DWORD Routine)
|
||||
{
|
||||
PWINDOW_OBJECT WindowObject;
|
||||
switch(Routine)
|
||||
{
|
||||
case TWOPARAM_ROUTINE_ENABLEWINDOW:
|
||||
|
@ -109,6 +125,19 @@ NtUserCallTwoParam(
|
|||
case TWOPARAM_ROUTINE_VALIDATERGN:
|
||||
return (DWORD)NtUserValidateRgn((HWND) Param1, (HRGN) Param2);
|
||||
|
||||
case TWOPARAM_ROUTINE_SETWNDCONTEXTHLPID:
|
||||
WindowObject = W32kGetWindowObject((HWND)Param1);
|
||||
if(!WindowObject)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
WindowObject->ContextHelpId = Param2;
|
||||
|
||||
W32kReleaseWindowObject(WindowObject);
|
||||
return TRUE;
|
||||
|
||||
}
|
||||
DPRINT1("Calling invalid routine number 0x%x in NtUserCallOneParam()\n Param1=0x%x Parm2=0x%x\n",
|
||||
Routine, Param1, Param2);
|
||||
|
|
|
@ -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: window.c,v 1.95 2003/08/17 19:07:11 silverblade Exp $
|
||||
/* $Id: window.c,v 1.96 2003/08/18 00:11:17 weiden Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -683,6 +683,7 @@ NtUserCreateWindowEx(DWORD dwExStyle,
|
|||
WindowObject->y = y;
|
||||
WindowObject->Width = nWidth;
|
||||
WindowObject->Height = nHeight;
|
||||
WindowObject->ContextHelpId = 0;
|
||||
WindowObject->ParentHandle = hWndParent;
|
||||
WindowObject->Menu = hMenu;
|
||||
WindowObject->Instance = hInstance;
|
||||
|
|
Loading…
Reference in a new issue