Commit a3d3b399 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

strmbase: Properly implement IVideoWindow::get_WindowState().

parent ab98626a
......@@ -1487,7 +1487,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw
hr = IVideoWindow_get_WindowState(window, &state);
ok(hr == S_OK, "Got hr %#x.\n", hr);
todo_wine ok(state == SW_HIDE, "Got state %d.\n", state);
ok(state == SW_HIDE, "Got state %d.\n", state);
hr = IVideoWindow_get_Visible(window, &state);
ok(state == OAFALSE, "Got state %d.\n", state);
......@@ -1501,7 +1501,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw
hr = IVideoWindow_get_WindowState(window, &state);
ok(hr == S_OK, "Got hr %#x.\n", hr);
todo_wine ok(state == SW_SHOW, "Got state %d.\n", state);
ok(state == SW_SHOW, "Got state %d.\n", state);
hr = IVideoWindow_get_Visible(window, &state);
ok(state == OATRUE, "Got state %d.\n", state);
......@@ -1518,7 +1518,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw
hr = IVideoWindow_get_WindowState(window, &state);
ok(hr == S_OK, "Got hr %#x.\n", hr);
todo_wine ok(state == SW_MINIMIZE, "Got state %d.\n", state);
ok(state == SW_MINIMIZE, "Got state %d.\n", state);
hr = IVideoWindow_get_Visible(window, &state);
ok(state == OATRUE, "Got state %d.\n", state);
......@@ -1533,7 +1533,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw
hr = IVideoWindow_get_WindowState(window, &state);
ok(hr == S_OK, "Got hr %#x.\n", hr);
todo_wine ok(state == SW_SHOW, "Got state %d.\n", state);
ok(state == SW_SHOW, "Got state %d.\n", state);
hr = IVideoWindow_get_Visible(window, &state);
ok(state == OATRUE, "Got state %d.\n", state);
......@@ -1566,7 +1566,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw
hr = IVideoWindow_get_WindowState(window, &state);
ok(hr == S_OK, "Got hr %#x.\n", hr);
todo_wine ok(state == SW_HIDE, "Got state %d.\n", state);
ok(state == SW_HIDE, "Got state %d.\n", state);
hr = IVideoWindow_get_Visible(window, &state);
ok(state == OAFALSE, "Got state %d.\n", state);
......@@ -1581,7 +1581,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw
hr = IVideoWindow_get_WindowState(window, &state);
ok(hr == S_OK, "Got hr %#x.\n", hr);
todo_wine ok(state == SW_SHOW, "Got state %d.\n", state);
ok(state == SW_SHOW, "Got state %d.\n", state);
hr = IVideoWindow_get_Visible(window, &state);
ok(state == OATRUE, "Got state %d.\n", state);
......@@ -1596,7 +1596,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw
hr = IVideoWindow_get_WindowState(window, &state);
ok(hr == S_OK, "Got hr %#x.\n", hr);
todo_wine ok(state == SW_HIDE, "Got state %d.\n", state);
ok(state == SW_HIDE, "Got state %d.\n", state);
hr = IVideoWindow_get_Visible(window, &state);
ok(state == OAFALSE, "Got state %d.\n", state);
......
......@@ -402,15 +402,22 @@ HRESULT WINAPI BaseControlWindowImpl_put_WindowState(IVideoWindow *iface, LONG W
return S_OK;
}
HRESULT WINAPI BaseControlWindowImpl_get_WindowState(IVideoWindow *iface, LONG *WindowState)
HRESULT WINAPI BaseControlWindowImpl_get_WindowState(IVideoWindow *iface, LONG *state)
{
WINDOWPLACEMENT place;
BaseControlWindow* This = impl_from_IVideoWindow(iface);
BaseControlWindow *window = impl_from_IVideoWindow(iface);
DWORD style;
place.length = sizeof(place);
GetWindowPlacement(This->baseWindow.hWnd, &place);
TRACE("(%p/%p)->(%p)\n", This, iface, WindowState);
*WindowState = place.showCmd;
TRACE("window %p, state %p.\n", window, state);
style = GetWindowLongPtrW(window->baseWindow.hWnd, GWL_STYLE);
if (!(style & WS_VISIBLE))
*state = SW_HIDE;
else if (style & WS_MINIMIZE)
*state = SW_MINIMIZE;
else if (style & WS_MAXIMIZE)
*state = SW_MAXIMIZE;
else
*state = SW_SHOW;
return S_OK;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment