mirror of
https://github.com/reactos/reactos.git
synced 2024-10-04 16:36:11 +00:00
- Implement NtUserMonitorFromWindow.
svn path=/trunk/; revision=12126
This commit is contained in:
parent
3b2955e805
commit
262a6b4866
|
@ -878,6 +878,23 @@ NtUserMonitorFromWindow(
|
||||||
IN HWND hWnd,
|
IN HWND hWnd,
|
||||||
IN DWORD dwFlags)
|
IN DWORD dwFlags)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
PWINDOW_OBJECT Window;
|
||||||
return (HMONITOR)NULL;
|
HMONITOR hMonitor = NULL;
|
||||||
|
RECT Rect;
|
||||||
|
|
||||||
|
Window = IntGetWindowObject(hWnd);
|
||||||
|
if (Window == NULL)
|
||||||
|
{
|
||||||
|
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
|
||||||
|
return (HMONITOR)NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
Rect.left = Rect.right = Window->WindowRect.left;
|
||||||
|
Rect.top = Rect.bottom = Window->WindowRect.bottom;
|
||||||
|
|
||||||
|
IntGetMonitorsFromRect(&Rect, &hMonitor, NULL, 1, dwFlags);
|
||||||
|
|
||||||
|
IntReleaseWindowObject(Window);
|
||||||
|
|
||||||
|
return hMonitor;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue