2 * Generic Implementation of strmbase window classes
4 * Copyright 2012 Aric Stewart, CodeWeavers
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "strmbase_private.h"
23 static inline BaseControlWindow
*impl_from_IVideoWindow( IVideoWindow
*iface
)
25 return CONTAINING_RECORD(iface
, BaseControlWindow
, IVideoWindow_iface
);
28 static inline BaseControlWindow
*impl_from_BaseWindow(BaseWindow
*iface
)
30 return CONTAINING_RECORD(iface
, BaseControlWindow
, baseWindow
);
33 static LRESULT CALLBACK
WndProcW(HWND hwnd
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
)
35 BaseWindow
* This
= (BaseWindow
*)GetWindowLongPtrW(hwnd
, 0);
38 return DefWindowProcW(hwnd
, uMsg
, wParam
, lParam
);
40 if (This
->pFuncsTable
->pfnOnReceiveMessage
)
41 return This
->pFuncsTable
->pfnOnReceiveMessage(This
, hwnd
, uMsg
, wParam
, lParam
);
43 return BaseWindowImpl_OnReceiveMessage(This
, hwnd
, uMsg
, wParam
, lParam
);
46 LRESULT WINAPI
BaseWindowImpl_OnReceiveMessage(BaseWindow
*This
, HWND hwnd
, INT uMsg
, WPARAM wParam
, LPARAM lParam
)
48 if (This
->pFuncsTable
->pfnPossiblyEatMessage
&& This
->pFuncsTable
->pfnPossiblyEatMessage(This
, uMsg
, wParam
, lParam
))
54 if (This
->pFuncsTable
->pfnOnSize
)
55 return This
->pFuncsTable
->pfnOnSize(This
, LOWORD(lParam
), HIWORD(lParam
));
57 return BaseWindowImpl_OnSize(This
, LOWORD(lParam
), HIWORD(lParam
));
60 return DefWindowProcW(hwnd
, uMsg
, wParam
, lParam
);
63 BOOL WINAPI
BaseWindowImpl_OnSize(BaseWindow
*This
, LONG Width
, LONG Height
)
66 This
->Height
= Height
;
70 HRESULT WINAPI
BaseWindow_Init(BaseWindow
*pBaseWindow
, const BaseWindowFuncTable
* pFuncsTable
)
75 ZeroMemory(pBaseWindow
,sizeof(BaseWindow
));
76 pBaseWindow
->pFuncsTable
= pFuncsTable
;
81 HRESULT WINAPI
BaseWindow_Destroy(BaseWindow
*This
)
84 BaseWindowImpl_DoneWithWindow(This
);
86 HeapFree(GetProcessHeap(), 0, This
);
90 HRESULT WINAPI
BaseWindowImpl_PrepareWindow(BaseWindow
*This
)
93 static const WCHAR windownameW
[] = { 'A','c','t','i','v','e','M','o','v','i','e',' ','W','i','n','d','o','w',0 };
95 This
->pClassName
= This
->pFuncsTable
->pfnGetClassWindowStyles(This
, &This
->ClassStyles
, &This
->WindowStyles
, &This
->WindowStylesEx
);
97 winclass
.style
= This
->ClassStyles
;
98 winclass
.lpfnWndProc
= WndProcW
;
99 winclass
.cbClsExtra
= 0;
100 winclass
.cbWndExtra
= sizeof(BaseWindow
*);
101 winclass
.hInstance
= This
->hInstance
;
102 winclass
.hIcon
= NULL
;
103 winclass
.hCursor
= NULL
;
104 winclass
.hbrBackground
= GetStockObject(BLACK_BRUSH
);
105 winclass
.lpszMenuName
= NULL
;
106 winclass
.lpszClassName
= This
->pClassName
;
107 if (!RegisterClassW(&winclass
) && GetLastError() != ERROR_CLASS_ALREADY_EXISTS
)
109 ERR("Unable to register window class: %u\n", GetLastError());
113 This
->hWnd
= CreateWindowExW(This
->WindowStylesEx
,
114 This
->pClassName
, windownameW
,
116 CW_USEDEFAULT
, CW_USEDEFAULT
, CW_USEDEFAULT
,
117 CW_USEDEFAULT
, NULL
, NULL
, This
->hInstance
,
122 ERR("Unable to create window\n");
126 SetWindowLongPtrW(This
->hWnd
, 0, (LONG_PTR
)This
);
128 This
->hDC
= GetDC(This
->hWnd
);
133 HRESULT WINAPI
BaseWindowImpl_DoneWithWindow(BaseWindow
*This
)
139 ReleaseDC(This
->hWnd
, This
->hDC
);
142 DestroyWindow(This
->hWnd
);
148 RECT WINAPI
BaseWindowImpl_GetDefaultRect(BaseWindow
*This
)
150 static RECT defRect
= {0, 0, 800, 600};
154 BOOL WINAPI
BaseControlWindowImpl_PossiblyEatMessage(BaseWindow
*This
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
)
156 BaseControlWindow
* pControlWindow
= impl_from_BaseWindow(This
);
158 if (pControlWindow
->hwndDrain
)
164 case WM_LBUTTONDBLCLK
:
167 case WM_MBUTTONDBLCLK
:
170 case WM_MOUSEACTIVATE
:
172 case WM_NCLBUTTONDBLCLK
:
173 case WM_NCLBUTTONDOWN
:
175 case WM_NCMBUTTONDBLCLK
:
176 case WM_NCMBUTTONDOWN
:
179 case WM_NCRBUTTONDBLCLK
:
180 case WM_NCRBUTTONDOWN
:
182 case WM_RBUTTONDBLCLK
:
185 PostMessageW(pControlWindow
->hwndDrain
, uMsg
, wParam
, lParam
);
194 HRESULT WINAPI
BaseControlWindow_Init(BaseControlWindow
*pControlWindow
, const IVideoWindowVtbl
*lpVtbl
, BaseFilter
*owner
, CRITICAL_SECTION
*lock
, BasePin
* pPin
,const BaseWindowFuncTable
*pFuncsTable
)
198 hr
= BaseWindow_Init(&pControlWindow
->baseWindow
, pFuncsTable
);
201 BaseDispatch_Init(&pControlWindow
->baseDispatch
, &IID_IVideoWindow
);
202 pControlWindow
->IVideoWindow_iface
.lpVtbl
= lpVtbl
;
203 pControlWindow
->AutoShow
= TRUE
;
204 pControlWindow
->hwndDrain
= NULL
;
205 pControlWindow
->hwndOwner
= NULL
;
206 pControlWindow
->pFilter
= owner
;
207 pControlWindow
->pInterfaceLock
= lock
;
208 pControlWindow
->pPin
= pPin
;
213 HRESULT WINAPI
BaseControlWindow_Destroy(BaseControlWindow
*pControlWindow
)
215 BaseWindowImpl_DoneWithWindow(&pControlWindow
->baseWindow
);
216 return BaseDispatch_Destroy(&pControlWindow
->baseDispatch
);
219 HRESULT WINAPI
BaseControlWindowImpl_GetTypeInfoCount(IVideoWindow
*iface
, UINT
*pctinfo
)
221 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
223 return BaseDispatchImpl_GetTypeInfoCount(&This
->baseDispatch
, pctinfo
);
226 HRESULT WINAPI
BaseControlWindowImpl_GetTypeInfo(IVideoWindow
*iface
, UINT iTInfo
, LCID lcid
, ITypeInfo
**ppTInfo
)
228 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
230 return BaseDispatchImpl_GetTypeInfo(&This
->baseDispatch
, &IID_NULL
, iTInfo
, lcid
, ppTInfo
);
233 HRESULT WINAPI
BaseControlWindowImpl_GetIDsOfNames(IVideoWindow
*iface
, REFIID riid
, LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
235 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
237 return BaseDispatchImpl_GetIDsOfNames(&This
->baseDispatch
, riid
, rgszNames
, cNames
, lcid
, rgDispId
);
240 HRESULT WINAPI
BaseControlWindowImpl_Invoke(IVideoWindow
*iface
, DISPID dispIdMember
, REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
, VARIANT
*pVarResult
, EXCEPINFO
*pExepInfo
, UINT
*puArgErr
)
242 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
243 ITypeInfo
*pTypeInfo
;
246 hr
= BaseDispatchImpl_GetTypeInfo(&This
->baseDispatch
, riid
, 1, lcid
, &pTypeInfo
);
249 hr
= ITypeInfo_Invoke(pTypeInfo
, &This
->IVideoWindow_iface
, dispIdMember
, wFlags
, pDispParams
, pVarResult
, pExepInfo
, puArgErr
);
250 ITypeInfo_Release(pTypeInfo
);
256 HRESULT WINAPI
BaseControlWindowImpl_put_Caption(IVideoWindow
*iface
, BSTR strCaption
)
258 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
260 TRACE("(%p/%p)->(%s (%p))\n", This
, iface
, debugstr_w(strCaption
), strCaption
);
262 if (!SetWindowTextW(This
->baseWindow
.hWnd
, strCaption
))
268 HRESULT WINAPI
BaseControlWindowImpl_get_Caption(IVideoWindow
*iface
, BSTR
*strCaption
)
270 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
272 TRACE("(%p/%p)->(%p)\n", This
, iface
, strCaption
);
274 GetWindowTextW(This
->baseWindow
.hWnd
, (LPWSTR
)strCaption
, 100);
279 HRESULT WINAPI
BaseControlWindowImpl_put_WindowStyle(IVideoWindow
*iface
, LONG WindowStyle
)
281 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
284 old
= GetWindowLongW(This
->baseWindow
.hWnd
, GWL_STYLE
);
286 TRACE("(%p/%p)->(%x -> %x)\n", This
, iface
, old
, WindowStyle
);
288 if (WindowStyle
& (WS_DISABLED
|WS_HSCROLL
|WS_ICONIC
|WS_MAXIMIZE
|WS_MINIMIZE
|WS_VSCROLL
))
291 SetWindowLongW(This
->baseWindow
.hWnd
, GWL_STYLE
, WindowStyle
);
292 SetWindowPos(This
->baseWindow
.hWnd
,0,0,0,0,0,SWP_FRAMECHANGED
|SWP_NOSIZE
|SWP_NOZORDER
);
293 This
->baseWindow
.WindowStyles
= WindowStyle
;
298 HRESULT WINAPI
BaseControlWindowImpl_get_WindowStyle(IVideoWindow
*iface
, LONG
*WindowStyle
)
300 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
302 TRACE("(%p/%p)->(%p)\n", This
, iface
, WindowStyle
);
304 *WindowStyle
= This
->baseWindow
.WindowStyles
;
309 HRESULT WINAPI
BaseControlWindowImpl_put_WindowStyleEx(IVideoWindow
*iface
, LONG WindowStyleEx
)
311 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
313 TRACE("(%p/%p)->(%d)\n", This
, iface
, WindowStyleEx
);
315 if (!SetWindowLongW(This
->baseWindow
.hWnd
, GWL_EXSTYLE
, WindowStyleEx
))
321 HRESULT WINAPI
BaseControlWindowImpl_get_WindowStyleEx(IVideoWindow
*iface
, LONG
*WindowStyleEx
)
323 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
325 TRACE("(%p/%p)->(%p)\n", This
, iface
, WindowStyleEx
);
327 *WindowStyleEx
= GetWindowLongW(This
->baseWindow
.hWnd
, GWL_EXSTYLE
);
332 HRESULT WINAPI
BaseControlWindowImpl_put_AutoShow(IVideoWindow
*iface
, LONG AutoShow
)
334 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
336 TRACE("(%p/%p)->(%d)\n", This
, iface
, AutoShow
);
338 This
->AutoShow
= AutoShow
;
343 HRESULT WINAPI
BaseControlWindowImpl_get_AutoShow(IVideoWindow
*iface
, LONG
*AutoShow
)
345 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
347 TRACE("(%p/%p)->(%p)\n", This
, iface
, AutoShow
);
349 *AutoShow
= This
->AutoShow
;
354 HRESULT WINAPI
BaseControlWindowImpl_put_WindowState(IVideoWindow
*iface
, LONG WindowState
)
356 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
358 TRACE("(%p/%p)->(%d)\n", This
, iface
, WindowState
);
359 ShowWindow(This
->baseWindow
.hWnd
, WindowState
);
363 HRESULT WINAPI
BaseControlWindowImpl_get_WindowState(IVideoWindow
*iface
, LONG
*WindowState
)
365 WINDOWPLACEMENT place
;
366 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
368 place
.length
= sizeof(place
);
369 GetWindowPlacement(This
->baseWindow
.hWnd
, &place
);
370 TRACE("(%p/%p)->(%p)\n", This
, iface
, WindowState
);
371 *WindowState
= place
.showCmd
;
376 HRESULT WINAPI
BaseControlWindowImpl_put_BackgroundPalette(IVideoWindow
*iface
, LONG BackgroundPalette
)
378 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
380 FIXME("(%p/%p)->(%d): stub !!!\n", This
, iface
, BackgroundPalette
);
385 HRESULT WINAPI
BaseControlWindowImpl_get_BackgroundPalette(IVideoWindow
*iface
, LONG
*pBackgroundPalette
)
387 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
389 FIXME("(%p/%p)->(%p): stub !!!\n", This
, iface
, pBackgroundPalette
);
394 HRESULT WINAPI
BaseControlWindowImpl_put_Visible(IVideoWindow
*iface
, LONG Visible
)
396 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
398 TRACE("(%p/%p)->(%d)\n", This
, iface
, Visible
);
400 ShowWindow(This
->baseWindow
.hWnd
, Visible
? SW_SHOW
: SW_HIDE
);
405 HRESULT WINAPI
BaseControlWindowImpl_get_Visible(IVideoWindow
*iface
, LONG
*pVisible
)
407 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
409 TRACE("(%p/%p)->(%p)\n", This
, iface
, pVisible
);
411 *pVisible
= IsWindowVisible(This
->baseWindow
.hWnd
);
416 HRESULT WINAPI
BaseControlWindowImpl_put_Left(IVideoWindow
*iface
, LONG Left
)
418 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
421 TRACE("(%p/%p)->(%d)\n", This
, iface
, Left
);
423 GetWindowRect(This
->baseWindow
.hWnd
, &WindowPos
);
424 if (!SetWindowPos(This
->baseWindow
.hWnd
, NULL
, Left
, WindowPos
.top
, 0, 0, SWP_NOZORDER
|SWP_NOSIZE
))
430 HRESULT WINAPI
BaseControlWindowImpl_get_Left(IVideoWindow
*iface
, LONG
*pLeft
)
432 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
435 TRACE("(%p/%p)->(%p)\n", This
, iface
, pLeft
);
436 GetWindowRect(This
->baseWindow
.hWnd
, &WindowPos
);
438 *pLeft
= WindowPos
.left
;
443 HRESULT WINAPI
BaseControlWindowImpl_put_Width(IVideoWindow
*iface
, LONG Width
)
445 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
447 TRACE("(%p/%p)->(%d)\n", This
, iface
, Width
);
449 if (!SetWindowPos(This
->baseWindow
.hWnd
, NULL
, 0, 0, Width
, This
->baseWindow
.Height
, SWP_NOZORDER
|SWP_NOMOVE
))
452 This
->baseWindow
.Width
= Width
;
457 HRESULT WINAPI
BaseControlWindowImpl_get_Width(IVideoWindow
*iface
, LONG
*pWidth
)
459 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
461 TRACE("(%p/%p)->(%p)\n", This
, iface
, pWidth
);
463 *pWidth
= This
->baseWindow
.Width
;
468 HRESULT WINAPI
BaseControlWindowImpl_put_Top(IVideoWindow
*iface
, LONG Top
)
470 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
473 TRACE("(%p/%p)->(%d)\n", This
, iface
, Top
);
474 GetWindowRect(This
->baseWindow
.hWnd
, &WindowPos
);
476 if (!SetWindowPos(This
->baseWindow
.hWnd
, NULL
, WindowPos
.left
, Top
, 0, 0, SWP_NOZORDER
|SWP_NOSIZE
))
482 HRESULT WINAPI
BaseControlWindowImpl_get_Top(IVideoWindow
*iface
, LONG
*pTop
)
484 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
487 TRACE("(%p/%p)->(%p)\n", This
, iface
, pTop
);
488 GetWindowRect(This
->baseWindow
.hWnd
, &WindowPos
);
490 *pTop
= WindowPos
.top
;
495 HRESULT WINAPI
BaseControlWindowImpl_put_Height(IVideoWindow
*iface
, LONG Height
)
497 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
499 TRACE("(%p/%p)->(%d)\n", This
, iface
, Height
);
501 if (!SetWindowPos(This
->baseWindow
.hWnd
, NULL
, 0, 0, This
->baseWindow
.Width
, Height
, SWP_NOZORDER
|SWP_NOMOVE
))
504 This
->baseWindow
.Height
= Height
;
509 HRESULT WINAPI
BaseControlWindowImpl_get_Height(IVideoWindow
*iface
, LONG
*pHeight
)
511 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
513 TRACE("(%p/%p)->(%p)\n", This
, iface
, pHeight
);
515 *pHeight
= This
->baseWindow
.Height
;
520 HRESULT WINAPI
BaseControlWindowImpl_put_Owner(IVideoWindow
*iface
, OAHWND Owner
)
522 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
524 TRACE("(%p/%p)->(%08x)\n", This
, iface
, (DWORD
) Owner
);
526 This
->hwndOwner
= (HWND
)Owner
;
527 SetParent(This
->baseWindow
.hWnd
, This
->hwndOwner
);
528 if (This
->baseWindow
.WindowStyles
& WS_CHILD
)
530 LONG old
= GetWindowLongW(This
->baseWindow
.hWnd
, GWL_STYLE
);
531 if (old
!= This
->baseWindow
.WindowStyles
)
533 SetWindowLongW(This
->baseWindow
.hWnd
, GWL_STYLE
, This
->baseWindow
.WindowStyles
);
534 SetWindowPos(This
->baseWindow
.hWnd
,0,0,0,0,0,SWP_FRAMECHANGED
|SWP_NOSIZE
|SWP_NOZORDER
);
541 HRESULT WINAPI
BaseControlWindowImpl_get_Owner(IVideoWindow
*iface
, OAHWND
*Owner
)
543 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
545 TRACE("(%p/%p)->(%p)\n", This
, iface
, Owner
);
547 *(HWND
*)Owner
= This
->hwndOwner
;
552 HRESULT WINAPI
BaseControlWindowImpl_put_MessageDrain(IVideoWindow
*iface
, OAHWND Drain
)
554 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
556 TRACE("(%p/%p)->(%08x)\n", This
, iface
, (DWORD
) Drain
);
558 This
->hwndDrain
= (HWND
)Drain
;
563 HRESULT WINAPI
BaseControlWindowImpl_get_MessageDrain(IVideoWindow
*iface
, OAHWND
*Drain
)
565 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
567 TRACE("(%p/%p)->(%p)\n", This
, iface
, Drain
);
569 *Drain
= (OAHWND
)This
->hwndDrain
;
574 HRESULT WINAPI
BaseControlWindowImpl_get_BorderColor(IVideoWindow
*iface
, LONG
*Color
)
576 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
578 FIXME("(%p/%p)->(%p): stub !!!\n", This
, iface
, Color
);
583 HRESULT WINAPI
BaseControlWindowImpl_put_BorderColor(IVideoWindow
*iface
, LONG Color
)
585 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
587 FIXME("(%p/%p)->(%d): stub !!!\n", This
, iface
, Color
);
592 HRESULT WINAPI
BaseControlWindowImpl_get_FullScreenMode(IVideoWindow
*iface
, LONG
*FullScreenMode
)
594 TRACE("(%p)->(%p)\n", iface
, FullScreenMode
);
599 HRESULT WINAPI
BaseControlWindowImpl_put_FullScreenMode(IVideoWindow
*iface
, LONG FullScreenMode
)
601 TRACE("(%p)->(%d)\n", iface
, FullScreenMode
);
605 HRESULT WINAPI
BaseControlWindowImpl_SetWindowForeground(IVideoWindow
*iface
, LONG Focus
)
607 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
612 TRACE("(%p/%p)->(%d)\n", This
, iface
, Focus
);
614 if ((Focus
!= FALSE
) && (Focus
!= TRUE
))
617 hr
= IPin_ConnectedTo(&This
->pPin
->IPin_iface
, &pPin
);
618 if ((hr
!= S_OK
) || !pPin
)
619 return VFW_E_NOT_CONNECTED
;
622 ret
= SetForegroundWindow(This
->baseWindow
.hWnd
);
624 ret
= SetWindowPos(This
->baseWindow
.hWnd
, HWND_TOP
, 0, 0, 0, 0, SWP_NOMOVE
|SWP_NOSIZE
);
632 HRESULT WINAPI
BaseControlWindowImpl_SetWindowPosition(IVideoWindow
*iface
, LONG Left
, LONG Top
, LONG Width
, LONG Height
)
634 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
636 TRACE("(%p/%p)->(%d, %d, %d, %d)\n", This
, iface
, Left
, Top
, Width
, Height
);
638 if (!SetWindowPos(This
->baseWindow
.hWnd
, NULL
, Left
, Top
, Width
, Height
, SWP_NOZORDER
))
641 This
->baseWindow
.Width
= Width
;
642 This
->baseWindow
.Height
= Height
;
647 HRESULT WINAPI
BaseControlWindowImpl_GetWindowPosition(IVideoWindow
*iface
, LONG
*pLeft
, LONG
*pTop
, LONG
*pWidth
, LONG
*pHeight
)
649 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
652 TRACE("(%p/%p)->(%p, %p, %p, %p)\n", This
, iface
, pLeft
, pTop
, pWidth
, pHeight
);
653 GetWindowRect(This
->baseWindow
.hWnd
, &WindowPos
);
655 *pLeft
= WindowPos
.left
;
656 *pTop
= WindowPos
.top
;
657 *pWidth
= This
->baseWindow
.Width
;
658 *pHeight
= This
->baseWindow
.Height
;
663 HRESULT WINAPI
BaseControlWindowImpl_NotifyOwnerMessage(IVideoWindow
*iface
, OAHWND hwnd
, LONG uMsg
, LONG_PTR wParam
, LONG_PTR lParam
)
665 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
667 TRACE("(%p/%p)->(%08lx, %d, %08lx, %08lx)\n", This
, iface
, hwnd
, uMsg
, wParam
, lParam
);
669 if (!PostMessageW(This
->baseWindow
.hWnd
, uMsg
, wParam
, lParam
))
675 HRESULT WINAPI
BaseControlWindowImpl_GetMinIdealImageSize(IVideoWindow
*iface
, LONG
*pWidth
, LONG
*pHeight
)
677 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
680 TRACE("(%p/%p)->(%p, %p)\n", This
, iface
, pWidth
, pHeight
);
681 defaultRect
= This
->baseWindow
.pFuncsTable
->pfnGetDefaultRect(&This
->baseWindow
);
683 *pWidth
= defaultRect
.right
- defaultRect
.left
;
684 *pHeight
= defaultRect
.bottom
- defaultRect
.top
;
689 HRESULT WINAPI
BaseControlWindowImpl_GetMaxIdealImageSize(IVideoWindow
*iface
, LONG
*pWidth
, LONG
*pHeight
)
691 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
694 TRACE("(%p/%p)->(%p, %p)\n", This
, iface
, pWidth
, pHeight
);
695 defaultRect
= This
->baseWindow
.pFuncsTable
->pfnGetDefaultRect(&This
->baseWindow
);
697 *pWidth
= defaultRect
.right
- defaultRect
.left
;
698 *pHeight
= defaultRect
.bottom
- defaultRect
.top
;
703 HRESULT WINAPI
BaseControlWindowImpl_GetRestorePosition(IVideoWindow
*iface
, LONG
*pLeft
, LONG
*pTop
, LONG
*pWidth
, LONG
*pHeight
)
705 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
707 FIXME("(%p/%p)->(%p, %p, %p, %p): stub !!!\n", This
, iface
, pLeft
, pTop
, pWidth
, pHeight
);
712 HRESULT WINAPI
BaseControlWindowImpl_HideCursor(IVideoWindow
*iface
, LONG HideCursor
)
714 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
716 FIXME("(%p/%p)->(%d): stub !!!\n", This
, iface
, HideCursor
);
721 HRESULT WINAPI
BaseControlWindowImpl_IsCursorHidden(IVideoWindow
*iface
, LONG
*CursorHidden
)
723 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
725 FIXME("(%p/%p)->(%p): stub !!!\n", This
, iface
, CursorHidden
);