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
24 #include "wine/debug.h"
25 #include "wine/unicode.h"
26 #include "wine/strmbase.h"
31 WINE_DEFAULT_DEBUG_CHANNEL(strmbase
);
33 static inline BaseControlWindow
*impl_from_IVideoWindow( IVideoWindow
*iface
)
35 return CONTAINING_RECORD(iface
, BaseControlWindow
, IVideoWindow_iface
);
38 static inline BaseControlWindow
*impl_from_BaseWindow(BaseWindow
*iface
)
40 return CONTAINING_RECORD(iface
, BaseControlWindow
, baseWindow
);
43 static LRESULT CALLBACK
WndProcW(HWND hwnd
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
)
45 BaseWindow
* This
= (BaseWindow
*)GetWindowLongPtrW(hwnd
, 0);
48 return DefWindowProcW(hwnd
, uMsg
, wParam
, lParam
);
50 if (This
->pFuncsTable
->pfnOnReceiveMessage
)
51 return This
->pFuncsTable
->pfnOnReceiveMessage(This
, hwnd
, uMsg
, wParam
, lParam
);
53 return BaseWindowImpl_OnReceiveMessage(This
, hwnd
, uMsg
, wParam
, lParam
);
56 LRESULT WINAPI
BaseWindowImpl_OnReceiveMessage(BaseWindow
*This
, HWND hwnd
, INT uMsg
, WPARAM wParam
, LPARAM lParam
)
58 if (This
->pFuncsTable
->pfnPossiblyEatMessage
&& This
->pFuncsTable
->pfnPossiblyEatMessage(This
, uMsg
, wParam
, lParam
))
64 if (This
->pFuncsTable
->pfnOnSize
)
65 return This
->pFuncsTable
->pfnOnSize(This
, LOWORD(lParam
), HIWORD(lParam
));
67 return BaseWindowImpl_OnSize(This
, LOWORD(lParam
), HIWORD(lParam
));
70 return DefWindowProcW(hwnd
, uMsg
, wParam
, lParam
);
73 BOOL WINAPI
BaseWindowImpl_OnSize(BaseWindow
*This
, LONG Width
, LONG Height
)
76 This
->Height
= Height
;
80 HRESULT WINAPI
BaseWindow_Init(BaseWindow
*pBaseWindow
, const BaseWindowFuncTable
* pFuncsTable
)
85 ZeroMemory(pBaseWindow
,sizeof(BaseWindow
));
86 pBaseWindow
->pFuncsTable
= pFuncsTable
;
91 HRESULT WINAPI
BaseWindow_Destroy(BaseWindow
*This
)
94 BaseWindowImpl_DoneWithWindow(This
);
96 HeapFree(GetProcessHeap(), 0, This
);
100 HRESULT WINAPI
BaseWindowImpl_PrepareWindow(BaseWindow
*This
)
103 static const WCHAR windownameW
[] = { 'A','c','t','i','v','e','M','o','v','i','e',' ','W','i','n','d','o','w',0 };
105 This
->pClassName
= This
->pFuncsTable
->pfnGetClassWindowStyles(This
, &This
->ClassStyles
, &This
->WindowStyles
, &This
->WindowStylesEx
);
107 winclass
.style
= This
->ClassStyles
;
108 winclass
.lpfnWndProc
= WndProcW
;
109 winclass
.cbClsExtra
= 0;
110 winclass
.cbWndExtra
= sizeof(BaseWindow
*);
111 winclass
.hInstance
= This
->hInstance
;
112 winclass
.hIcon
= NULL
;
113 winclass
.hCursor
= NULL
;
114 winclass
.hbrBackground
= GetStockObject(BLACK_BRUSH
);
115 winclass
.lpszMenuName
= NULL
;
116 winclass
.lpszClassName
= This
->pClassName
;
117 if (!RegisterClassW(&winclass
) && GetLastError() != ERROR_CLASS_ALREADY_EXISTS
)
119 ERR("Unable to register window class: %u\n", GetLastError());
123 This
->hWnd
= CreateWindowExW(This
->WindowStylesEx
,
124 This
->pClassName
, windownameW
,
126 CW_USEDEFAULT
, CW_USEDEFAULT
, CW_USEDEFAULT
,
127 CW_USEDEFAULT
, NULL
, NULL
, This
->hInstance
,
132 ERR("Unable to create window\n");
136 SetWindowLongPtrW(This
->hWnd
, 0, (LONG_PTR
)This
);
138 This
->hDC
= GetDC(This
->hWnd
);
143 HRESULT WINAPI
BaseWindowImpl_DoneWithWindow(BaseWindow
*This
)
149 ReleaseDC(This
->hWnd
, This
->hDC
);
152 DestroyWindow(This
->hWnd
);
158 RECT WINAPI
BaseWindowImpl_GetDefaultRect(BaseWindow
*This
)
160 static RECT defRect
= {0, 0, 800, 600};
164 BOOL WINAPI
BaseControlWindowImpl_PossiblyEatMessage(BaseWindow
*This
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
)
166 BaseControlWindow
* pControlWindow
= impl_from_BaseWindow(This
);
168 if (pControlWindow
->hwndDrain
)
174 case WM_LBUTTONDBLCLK
:
177 case WM_MBUTTONDBLCLK
:
180 case WM_MOUSEACTIVATE
:
182 case WM_NCLBUTTONDBLCLK
:
183 case WM_NCLBUTTONDOWN
:
185 case WM_NCMBUTTONDBLCLK
:
186 case WM_NCMBUTTONDOWN
:
189 case WM_NCRBUTTONDBLCLK
:
190 case WM_NCRBUTTONDOWN
:
192 case WM_RBUTTONDBLCLK
:
195 PostMessageW(pControlWindow
->hwndDrain
, uMsg
, wParam
, lParam
);
204 HRESULT WINAPI
BaseControlWindow_Init(BaseControlWindow
*pControlWindow
, const IVideoWindowVtbl
*lpVtbl
, BaseFilter
*owner
, CRITICAL_SECTION
*lock
, BasePin
* pPin
,const BaseWindowFuncTable
*pFuncsTable
)
208 hr
= BaseWindow_Init(&pControlWindow
->baseWindow
, pFuncsTable
);
211 BaseDispatch_Init(&pControlWindow
->baseDispatch
, &IID_IVideoWindow
);
212 pControlWindow
->IVideoWindow_iface
.lpVtbl
= lpVtbl
;
213 pControlWindow
->AutoShow
= TRUE
;
214 pControlWindow
->hwndDrain
= NULL
;
215 pControlWindow
->hwndOwner
= NULL
;
216 pControlWindow
->pFilter
= owner
;
217 pControlWindow
->pInterfaceLock
= lock
;
218 pControlWindow
->pPin
= pPin
;
223 HRESULT WINAPI
BaseControlWindow_Destroy(BaseControlWindow
*pControlWindow
)
225 BaseWindowImpl_DoneWithWindow(&pControlWindow
->baseWindow
);
226 return BaseDispatch_Destroy(&pControlWindow
->baseDispatch
);
229 HRESULT WINAPI
BaseControlWindowImpl_GetTypeInfoCount(IVideoWindow
*iface
, UINT
*pctinfo
)
231 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
233 return BaseDispatchImpl_GetTypeInfoCount(&This
->baseDispatch
, pctinfo
);
236 HRESULT WINAPI
BaseControlWindowImpl_GetTypeInfo(IVideoWindow
*iface
, UINT iTInfo
, LCID lcid
, ITypeInfo
**ppTInfo
)
238 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
240 return BaseDispatchImpl_GetTypeInfo(&This
->baseDispatch
, &IID_NULL
, iTInfo
, lcid
, ppTInfo
);
243 HRESULT WINAPI
BaseControlWindowImpl_GetIDsOfNames(IVideoWindow
*iface
, REFIID riid
, LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
245 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
247 return BaseDispatchImpl_GetIDsOfNames(&This
->baseDispatch
, riid
, rgszNames
, cNames
, lcid
, rgDispId
);
250 HRESULT WINAPI
BaseControlWindowImpl_Invoke(IVideoWindow
*iface
, DISPID dispIdMember
, REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
, VARIANT
*pVarResult
, EXCEPINFO
*pExepInfo
, UINT
*puArgErr
)
252 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
254 ITypeInfo
*pTypeInfo
;
256 hr
= BaseDispatchImpl_GetTypeInfo(&This
->baseDispatch
, riid
, 1, lcid
, &pTypeInfo
);
259 hr
= ITypeInfo_Invoke(pTypeInfo
, &This
->IVideoWindow_iface
, dispIdMember
, wFlags
, pDispParams
, pVarResult
, pExepInfo
, puArgErr
);
260 ITypeInfo_Release(pTypeInfo
);
266 HRESULT WINAPI
BaseControlWindowImpl_put_Caption(IVideoWindow
*iface
, BSTR strCaption
)
268 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
270 TRACE("(%p/%p)->(%s (%p))\n", This
, iface
, debugstr_w(strCaption
), strCaption
);
272 if (!SetWindowTextW(This
->baseWindow
.hWnd
, strCaption
))
278 HRESULT WINAPI
BaseControlWindowImpl_get_Caption(IVideoWindow
*iface
, BSTR
*strCaption
)
280 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
282 TRACE("(%p/%p)->(%p)\n", This
, iface
, strCaption
);
284 GetWindowTextW(This
->baseWindow
.hWnd
, (LPWSTR
)strCaption
, 100);
289 HRESULT WINAPI
BaseControlWindowImpl_put_WindowStyle(IVideoWindow
*iface
, LONG WindowStyle
)
291 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
294 old
= GetWindowLongW(This
->baseWindow
.hWnd
, GWL_STYLE
);
296 TRACE("(%p/%p)->(%x -> %x)\n", This
, iface
, old
, WindowStyle
);
298 if (WindowStyle
& (WS_DISABLED
|WS_HSCROLL
|WS_ICONIC
|WS_MAXIMIZE
|WS_MINIMIZE
|WS_VSCROLL
))
301 SetWindowLongW(This
->baseWindow
.hWnd
, GWL_STYLE
, WindowStyle
);
302 SetWindowPos(This
->baseWindow
.hWnd
,0,0,0,0,0,SWP_FRAMECHANGED
|SWP_NOSIZE
|SWP_NOZORDER
);
303 This
->baseWindow
.WindowStyles
= WindowStyle
;
308 HRESULT WINAPI
BaseControlWindowImpl_get_WindowStyle(IVideoWindow
*iface
, LONG
*WindowStyle
)
310 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
312 TRACE("(%p/%p)->(%p)\n", This
, iface
, WindowStyle
);
314 *WindowStyle
= This
->baseWindow
.WindowStyles
;
319 HRESULT WINAPI
BaseControlWindowImpl_put_WindowStyleEx(IVideoWindow
*iface
, LONG WindowStyleEx
)
321 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
323 TRACE("(%p/%p)->(%d)\n", This
, iface
, WindowStyleEx
);
325 if (!SetWindowLongW(This
->baseWindow
.hWnd
, GWL_EXSTYLE
, WindowStyleEx
))
331 HRESULT WINAPI
BaseControlWindowImpl_get_WindowStyleEx(IVideoWindow
*iface
, LONG
*WindowStyleEx
)
333 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
335 TRACE("(%p/%p)->(%p)\n", This
, iface
, WindowStyleEx
);
337 *WindowStyleEx
= GetWindowLongW(This
->baseWindow
.hWnd
, GWL_EXSTYLE
);
342 HRESULT WINAPI
BaseControlWindowImpl_put_AutoShow(IVideoWindow
*iface
, LONG AutoShow
)
344 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
346 TRACE("(%p/%p)->(%d)\n", This
, iface
, AutoShow
);
348 This
->AutoShow
= AutoShow
;
353 HRESULT WINAPI
BaseControlWindowImpl_get_AutoShow(IVideoWindow
*iface
, LONG
*AutoShow
)
355 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
357 TRACE("(%p/%p)->(%p)\n", This
, iface
, AutoShow
);
359 *AutoShow
= This
->AutoShow
;
364 HRESULT WINAPI
BaseControlWindowImpl_put_WindowState(IVideoWindow
*iface
, LONG WindowState
)
366 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
368 TRACE("(%p/%p)->(%d)\n", This
, iface
, WindowState
);
369 ShowWindow(This
->baseWindow
.hWnd
, WindowState
);
373 HRESULT WINAPI
BaseControlWindowImpl_get_WindowState(IVideoWindow
*iface
, LONG
*WindowState
)
375 WINDOWPLACEMENT place
;
376 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
378 place
.length
= sizeof(place
);
379 GetWindowPlacement(This
->baseWindow
.hWnd
, &place
);
380 TRACE("(%p/%p)->(%p)\n", This
, iface
, WindowState
);
381 *WindowState
= place
.showCmd
;
386 HRESULT WINAPI
BaseControlWindowImpl_put_BackgroundPalette(IVideoWindow
*iface
, LONG BackgroundPalette
)
388 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
390 FIXME("(%p/%p)->(%d): stub !!!\n", This
, iface
, BackgroundPalette
);
395 HRESULT WINAPI
BaseControlWindowImpl_get_BackgroundPalette(IVideoWindow
*iface
, LONG
*pBackgroundPalette
)
397 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
399 FIXME("(%p/%p)->(%p): stub !!!\n", This
, iface
, pBackgroundPalette
);
404 HRESULT WINAPI
BaseControlWindowImpl_put_Visible(IVideoWindow
*iface
, LONG Visible
)
406 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
408 TRACE("(%p/%p)->(%d)\n", This
, iface
, Visible
);
410 ShowWindow(This
->baseWindow
.hWnd
, Visible
? SW_SHOW
: SW_HIDE
);
415 HRESULT WINAPI
BaseControlWindowImpl_get_Visible(IVideoWindow
*iface
, LONG
*pVisible
)
417 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
419 TRACE("(%p/%p)->(%p)\n", This
, iface
, pVisible
);
421 *pVisible
= IsWindowVisible(This
->baseWindow
.hWnd
);
426 HRESULT WINAPI
BaseControlWindowImpl_put_Left(IVideoWindow
*iface
, LONG Left
)
428 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
431 TRACE("(%p/%p)->(%d)\n", This
, iface
, Left
);
433 GetWindowRect(This
->baseWindow
.hWnd
, &WindowPos
);
434 if (!SetWindowPos(This
->baseWindow
.hWnd
, NULL
, Left
, WindowPos
.top
, 0, 0, SWP_NOZORDER
|SWP_NOSIZE
))
440 HRESULT WINAPI
BaseControlWindowImpl_get_Left(IVideoWindow
*iface
, LONG
*pLeft
)
442 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
445 TRACE("(%p/%p)->(%p)\n", This
, iface
, pLeft
);
446 GetWindowRect(This
->baseWindow
.hWnd
, &WindowPos
);
448 *pLeft
= WindowPos
.left
;
453 HRESULT WINAPI
BaseControlWindowImpl_put_Width(IVideoWindow
*iface
, LONG Width
)
455 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
457 TRACE("(%p/%p)->(%d)\n", This
, iface
, Width
);
459 if (!SetWindowPos(This
->baseWindow
.hWnd
, NULL
, 0, 0, Width
, This
->baseWindow
.Height
, SWP_NOZORDER
|SWP_NOMOVE
))
462 This
->baseWindow
.Width
= Width
;
467 HRESULT WINAPI
BaseControlWindowImpl_get_Width(IVideoWindow
*iface
, LONG
*pWidth
)
469 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
471 TRACE("(%p/%p)->(%p)\n", This
, iface
, pWidth
);
473 *pWidth
= This
->baseWindow
.Width
;
478 HRESULT WINAPI
BaseControlWindowImpl_put_Top(IVideoWindow
*iface
, LONG Top
)
480 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
483 TRACE("(%p/%p)->(%d)\n", This
, iface
, Top
);
484 GetWindowRect(This
->baseWindow
.hWnd
, &WindowPos
);
486 if (!SetWindowPos(This
->baseWindow
.hWnd
, NULL
, WindowPos
.left
, Top
, 0, 0, SWP_NOZORDER
|SWP_NOSIZE
))
492 HRESULT WINAPI
BaseControlWindowImpl_get_Top(IVideoWindow
*iface
, LONG
*pTop
)
494 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
497 TRACE("(%p/%p)->(%p)\n", This
, iface
, pTop
);
498 GetWindowRect(This
->baseWindow
.hWnd
, &WindowPos
);
500 *pTop
= WindowPos
.top
;
505 HRESULT WINAPI
BaseControlWindowImpl_put_Height(IVideoWindow
*iface
, LONG Height
)
507 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
509 TRACE("(%p/%p)->(%d)\n", This
, iface
, Height
);
511 if (!SetWindowPos(This
->baseWindow
.hWnd
, NULL
, 0, 0, This
->baseWindow
.Width
, Height
, SWP_NOZORDER
|SWP_NOMOVE
))
514 This
->baseWindow
.Height
= Height
;
519 HRESULT WINAPI
BaseControlWindowImpl_get_Height(IVideoWindow
*iface
, LONG
*pHeight
)
521 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
523 TRACE("(%p/%p)->(%p)\n", This
, iface
, pHeight
);
525 *pHeight
= This
->baseWindow
.Height
;
530 HRESULT WINAPI
BaseControlWindowImpl_put_Owner(IVideoWindow
*iface
, OAHWND Owner
)
532 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
534 TRACE("(%p/%p)->(%08x)\n", This
, iface
, (DWORD
) Owner
);
536 This
->hwndOwner
= (HWND
)Owner
;
537 SetParent(This
->baseWindow
.hWnd
, This
->hwndOwner
);
538 if (This
->baseWindow
.WindowStyles
& WS_CHILD
)
540 LONG old
= GetWindowLongW(This
->baseWindow
.hWnd
, GWL_STYLE
);
541 if (old
!= This
->baseWindow
.WindowStyles
)
543 SetWindowLongW(This
->baseWindow
.hWnd
, GWL_STYLE
, This
->baseWindow
.WindowStyles
);
544 SetWindowPos(This
->baseWindow
.hWnd
,0,0,0,0,0,SWP_FRAMECHANGED
|SWP_NOSIZE
|SWP_NOZORDER
);
551 HRESULT WINAPI
BaseControlWindowImpl_get_Owner(IVideoWindow
*iface
, OAHWND
*Owner
)
553 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
555 TRACE("(%p/%p)->(%p)\n", This
, iface
, Owner
);
557 *(HWND
*)Owner
= This
->hwndOwner
;
562 HRESULT WINAPI
BaseControlWindowImpl_put_MessageDrain(IVideoWindow
*iface
, OAHWND Drain
)
564 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
566 TRACE("(%p/%p)->(%08x)\n", This
, iface
, (DWORD
) Drain
);
568 This
->hwndDrain
= (HWND
)Drain
;
573 HRESULT WINAPI
BaseControlWindowImpl_get_MessageDrain(IVideoWindow
*iface
, OAHWND
*Drain
)
575 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
577 TRACE("(%p/%p)->(%p)\n", This
, iface
, Drain
);
579 *Drain
= (OAHWND
)This
->hwndDrain
;
584 HRESULT WINAPI
BaseControlWindowImpl_get_BorderColor(IVideoWindow
*iface
, LONG
*Color
)
586 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
588 FIXME("(%p/%p)->(%p): stub !!!\n", This
, iface
, Color
);
593 HRESULT WINAPI
BaseControlWindowImpl_put_BorderColor(IVideoWindow
*iface
, LONG Color
)
595 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
597 FIXME("(%p/%p)->(%d): stub !!!\n", This
, iface
, Color
);
602 HRESULT WINAPI
BaseControlWindowImpl_get_FullScreenMode(IVideoWindow
*iface
, LONG
*FullScreenMode
)
604 TRACE("(%p)->(%p)\n", iface
, FullScreenMode
);
609 HRESULT WINAPI
BaseControlWindowImpl_put_FullScreenMode(IVideoWindow
*iface
, LONG FullScreenMode
)
611 TRACE("(%p)->(%d)\n", iface
, FullScreenMode
);
615 HRESULT WINAPI
BaseControlWindowImpl_SetWindowForeground(IVideoWindow
*iface
, LONG Focus
)
617 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
622 TRACE("(%p/%p)->(%d)\n", This
, iface
, Focus
);
624 if ((Focus
!= FALSE
) && (Focus
!= TRUE
))
627 hr
= IPin_ConnectedTo(&This
->pPin
->IPin_iface
, &pPin
);
628 if ((hr
!= S_OK
) || !pPin
)
629 return VFW_E_NOT_CONNECTED
;
632 ret
= SetForegroundWindow(This
->baseWindow
.hWnd
);
634 ret
= SetWindowPos(This
->baseWindow
.hWnd
, HWND_TOP
, 0, 0, 0, 0, SWP_NOMOVE
|SWP_NOSIZE
);
642 HRESULT WINAPI
BaseControlWindowImpl_SetWindowPosition(IVideoWindow
*iface
, LONG Left
, LONG Top
, LONG Width
, LONG Height
)
644 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
646 TRACE("(%p/%p)->(%d, %d, %d, %d)\n", This
, iface
, Left
, Top
, Width
, Height
);
648 if (!SetWindowPos(This
->baseWindow
.hWnd
, NULL
, Left
, Top
, Width
, Height
, SWP_NOZORDER
))
651 This
->baseWindow
.Width
= Width
;
652 This
->baseWindow
.Height
= Height
;
657 HRESULT WINAPI
BaseControlWindowImpl_GetWindowPosition(IVideoWindow
*iface
, LONG
*pLeft
, LONG
*pTop
, LONG
*pWidth
, LONG
*pHeight
)
659 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
662 TRACE("(%p/%p)->(%p, %p, %p, %p)\n", This
, iface
, pLeft
, pTop
, pWidth
, pHeight
);
663 GetWindowRect(This
->baseWindow
.hWnd
, &WindowPos
);
665 *pLeft
= WindowPos
.left
;
666 *pTop
= WindowPos
.top
;
667 *pWidth
= This
->baseWindow
.Width
;
668 *pHeight
= This
->baseWindow
.Height
;
673 HRESULT WINAPI
BaseControlWindowImpl_NotifyOwnerMessage(IVideoWindow
*iface
, OAHWND hwnd
, LONG uMsg
, LONG_PTR wParam
, LONG_PTR lParam
)
675 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
677 TRACE("(%p/%p)->(%08lx, %d, %08lx, %08lx)\n", This
, iface
, hwnd
, uMsg
, wParam
, lParam
);
679 if (!PostMessageW(This
->baseWindow
.hWnd
, uMsg
, wParam
, lParam
))
685 HRESULT WINAPI
BaseControlWindowImpl_GetMinIdealImageSize(IVideoWindow
*iface
, LONG
*pWidth
, LONG
*pHeight
)
687 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
690 TRACE("(%p/%p)->(%p, %p)\n", This
, iface
, pWidth
, pHeight
);
691 defaultRect
= This
->baseWindow
.pFuncsTable
->pfnGetDefaultRect(&This
->baseWindow
);
693 *pWidth
= defaultRect
.right
- defaultRect
.left
;
694 *pHeight
= defaultRect
.bottom
- defaultRect
.top
;
699 HRESULT WINAPI
BaseControlWindowImpl_GetMaxIdealImageSize(IVideoWindow
*iface
, LONG
*pWidth
, LONG
*pHeight
)
701 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
704 TRACE("(%p/%p)->(%p, %p)\n", This
, iface
, pWidth
, pHeight
);
705 defaultRect
= This
->baseWindow
.pFuncsTable
->pfnGetDefaultRect(&This
->baseWindow
);
707 *pWidth
= defaultRect
.right
- defaultRect
.left
;
708 *pHeight
= defaultRect
.bottom
- defaultRect
.top
;
713 HRESULT WINAPI
BaseControlWindowImpl_GetRestorePosition(IVideoWindow
*iface
, LONG
*pLeft
, LONG
*pTop
, LONG
*pWidth
, LONG
*pHeight
)
715 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
717 FIXME("(%p/%p)->(%p, %p, %p, %p): stub !!!\n", This
, iface
, pLeft
, pTop
, pWidth
, pHeight
);
722 HRESULT WINAPI
BaseControlWindowImpl_HideCursor(IVideoWindow
*iface
, LONG HideCursor
)
724 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
726 FIXME("(%p/%p)->(%d): stub !!!\n", This
, iface
, HideCursor
);
731 HRESULT WINAPI
BaseControlWindowImpl_IsCursorHidden(IVideoWindow
*iface
, LONG
*CursorHidden
)
733 BaseControlWindow
* This
= impl_from_IVideoWindow(iface
);
735 FIXME("(%p/%p)->(%p): stub !!!\n", This
, iface
, CursorHidden
);