ReactOS 0.4.16-dev-297-gc569aee
window.c File Reference
#include "dshow.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "wine/strmbase.h"
#include "uuids.h"
#include "vfwmsgs.h"
#include <assert.h>
Include dependency graph for window.c:

Go to the source code of this file.

Macros

#define COBJMACROS
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (strmbase)
 
static BaseControlWindow * impl_from_IVideoWindow (IVideoWindow *iface)
 
static BaseControlWindow * impl_from_BaseWindow (BaseWindow *iface)
 
static LRESULT CALLBACK WndProcW (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
LRESULT WINAPI BaseWindowImpl_OnReceiveMessage (BaseWindow *This, HWND hwnd, INT uMsg, WPARAM wParam, LPARAM lParam)
 
BOOL WINAPI BaseWindowImpl_OnSize (BaseWindow *This, LONG Width, LONG Height)
 
HRESULT WINAPI BaseWindow_Init (BaseWindow *pBaseWindow, const BaseWindowFuncTable *pFuncsTable)
 
HRESULT WINAPI BaseWindow_Destroy (BaseWindow *This)
 
HRESULT WINAPI BaseWindowImpl_PrepareWindow (BaseWindow *This)
 
HRESULT WINAPI BaseWindowImpl_DoneWithWindow (BaseWindow *This)
 
RECT WINAPI BaseWindowImpl_GetDefaultRect (BaseWindow *This)
 
BOOL WINAPI BaseControlWindowImpl_PossiblyEatMessage (BaseWindow *This, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
HRESULT WINAPI BaseControlWindow_Init (BaseControlWindow *pControlWindow, const IVideoWindowVtbl *lpVtbl, BaseFilter *owner, CRITICAL_SECTION *lock, BasePin *pPin, const BaseWindowFuncTable *pFuncsTable)
 
HRESULT WINAPI BaseControlWindow_Destroy (BaseControlWindow *pControlWindow)
 
HRESULT WINAPI BaseControlWindowImpl_GetTypeInfoCount (IVideoWindow *iface, UINT *pctinfo)
 
HRESULT WINAPI BaseControlWindowImpl_GetTypeInfo (IVideoWindow *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
HRESULT WINAPI BaseControlWindowImpl_GetIDsOfNames (IVideoWindow *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
HRESULT WINAPI BaseControlWindowImpl_Invoke (IVideoWindow *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExepInfo, UINT *puArgErr)
 
HRESULT WINAPI BaseControlWindowImpl_put_Caption (IVideoWindow *iface, BSTR strCaption)
 
HRESULT WINAPI BaseControlWindowImpl_get_Caption (IVideoWindow *iface, BSTR *strCaption)
 
HRESULT WINAPI BaseControlWindowImpl_put_WindowStyle (IVideoWindow *iface, LONG WindowStyle)
 
HRESULT WINAPI BaseControlWindowImpl_get_WindowStyle (IVideoWindow *iface, LONG *WindowStyle)
 
HRESULT WINAPI BaseControlWindowImpl_put_WindowStyleEx (IVideoWindow *iface, LONG WindowStyleEx)
 
HRESULT WINAPI BaseControlWindowImpl_get_WindowStyleEx (IVideoWindow *iface, LONG *WindowStyleEx)
 
HRESULT WINAPI BaseControlWindowImpl_put_AutoShow (IVideoWindow *iface, LONG AutoShow)
 
HRESULT WINAPI BaseControlWindowImpl_get_AutoShow (IVideoWindow *iface, LONG *AutoShow)
 
HRESULT WINAPI BaseControlWindowImpl_put_WindowState (IVideoWindow *iface, LONG WindowState)
 
HRESULT WINAPI BaseControlWindowImpl_get_WindowState (IVideoWindow *iface, LONG *WindowState)
 
HRESULT WINAPI BaseControlWindowImpl_put_BackgroundPalette (IVideoWindow *iface, LONG BackgroundPalette)
 
HRESULT WINAPI BaseControlWindowImpl_get_BackgroundPalette (IVideoWindow *iface, LONG *pBackgroundPalette)
 
HRESULT WINAPI BaseControlWindowImpl_put_Visible (IVideoWindow *iface, LONG Visible)
 
HRESULT WINAPI BaseControlWindowImpl_get_Visible (IVideoWindow *iface, LONG *pVisible)
 
HRESULT WINAPI BaseControlWindowImpl_put_Left (IVideoWindow *iface, LONG Left)
 
HRESULT WINAPI BaseControlWindowImpl_get_Left (IVideoWindow *iface, LONG *pLeft)
 
HRESULT WINAPI BaseControlWindowImpl_put_Width (IVideoWindow *iface, LONG Width)
 
HRESULT WINAPI BaseControlWindowImpl_get_Width (IVideoWindow *iface, LONG *pWidth)
 
HRESULT WINAPI BaseControlWindowImpl_put_Top (IVideoWindow *iface, LONG Top)
 
HRESULT WINAPI BaseControlWindowImpl_get_Top (IVideoWindow *iface, LONG *pTop)
 
HRESULT WINAPI BaseControlWindowImpl_put_Height (IVideoWindow *iface, LONG Height)
 
HRESULT WINAPI BaseControlWindowImpl_get_Height (IVideoWindow *iface, LONG *pHeight)
 
HRESULT WINAPI BaseControlWindowImpl_put_Owner (IVideoWindow *iface, OAHWND Owner)
 
HRESULT WINAPI BaseControlWindowImpl_get_Owner (IVideoWindow *iface, OAHWND *Owner)
 
HRESULT WINAPI BaseControlWindowImpl_put_MessageDrain (IVideoWindow *iface, OAHWND Drain)
 
HRESULT WINAPI BaseControlWindowImpl_get_MessageDrain (IVideoWindow *iface, OAHWND *Drain)
 
HRESULT WINAPI BaseControlWindowImpl_get_BorderColor (IVideoWindow *iface, LONG *Color)
 
HRESULT WINAPI BaseControlWindowImpl_put_BorderColor (IVideoWindow *iface, LONG Color)
 
HRESULT WINAPI BaseControlWindowImpl_get_FullScreenMode (IVideoWindow *iface, LONG *FullScreenMode)
 
HRESULT WINAPI BaseControlWindowImpl_put_FullScreenMode (IVideoWindow *iface, LONG FullScreenMode)
 
HRESULT WINAPI BaseControlWindowImpl_SetWindowForeground (IVideoWindow *iface, LONG Focus)
 
HRESULT WINAPI BaseControlWindowImpl_SetWindowPosition (IVideoWindow *iface, LONG Left, LONG Top, LONG Width, LONG Height)
 
HRESULT WINAPI BaseControlWindowImpl_GetWindowPosition (IVideoWindow *iface, LONG *pLeft, LONG *pTop, LONG *pWidth, LONG *pHeight)
 
HRESULT WINAPI BaseControlWindowImpl_NotifyOwnerMessage (IVideoWindow *iface, OAHWND hwnd, LONG uMsg, LONG_PTR wParam, LONG_PTR lParam)
 
HRESULT WINAPI BaseControlWindowImpl_GetMinIdealImageSize (IVideoWindow *iface, LONG *pWidth, LONG *pHeight)
 
HRESULT WINAPI BaseControlWindowImpl_GetMaxIdealImageSize (IVideoWindow *iface, LONG *pWidth, LONG *pHeight)
 
HRESULT WINAPI BaseControlWindowImpl_GetRestorePosition (IVideoWindow *iface, LONG *pLeft, LONG *pTop, LONG *pWidth, LONG *pHeight)
 
HRESULT WINAPI BaseControlWindowImpl_HideCursor (IVideoWindow *iface, LONG HideCursor)
 
HRESULT WINAPI BaseControlWindowImpl_IsCursorHidden (IVideoWindow *iface, LONG *CursorHidden)
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 21 of file window.c.

Function Documentation

◆ BaseControlWindow_Destroy()

HRESULT WINAPI BaseControlWindow_Destroy ( BaseControlWindow *  pControlWindow)

Definition at line 223 of file window.c.

224{
225 BaseWindowImpl_DoneWithWindow(&pControlWindow->baseWindow);
226 return BaseDispatch_Destroy(&pControlWindow->baseDispatch);
227}
HRESULT WINAPI BaseWindowImpl_DoneWithWindow(BaseWindow *This)
Definition: window.c:143
HRESULT WINAPI BaseDispatch_Destroy(BaseDispatch *This)
Definition: dispatch.c:45

Referenced by VideoRendererInner_Release(), and VMR9Inner_Release().

◆ BaseControlWindow_Init()

HRESULT WINAPI BaseControlWindow_Init ( BaseControlWindow *  pControlWindow,
const IVideoWindowVtbl *  lpVtbl,
BaseFilter owner,
CRITICAL_SECTION lock,
BasePin pPin,
const BaseWindowFuncTable pFuncsTable 
)

Definition at line 204 of file window.c.

205{
206 HRESULT hr;
207
208 hr = BaseWindow_Init(&pControlWindow->baseWindow, pFuncsTable);
209 if (SUCCEEDED(hr))
210 {
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;
219 }
220 return hr;
221}
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define SUCCEEDED(hr)
Definition: intsafe.h:50
HRESULT WINAPI BaseWindow_Init(BaseWindow *pBaseWindow, const BaseWindowFuncTable *pFuncsTable)
Definition: window.c:80
HRESULT hr
Definition: shlfolder.c:183
HRESULT WINAPI BaseDispatch_Init(BaseDispatch *This, REFIID riid)
Definition: dispatch.c:30
rwlock_t lock
Definition: tcpcore.h:0

Referenced by VideoRenderer_create(), and vmr_create().

◆ BaseControlWindowImpl_get_AutoShow()

HRESULT WINAPI BaseControlWindowImpl_get_AutoShow ( IVideoWindow *  iface,
LONG AutoShow 
)

Definition at line 353 of file window.c.

354{
355 BaseControlWindow* This = impl_from_IVideoWindow(iface);
356
357 TRACE("(%p/%p)->(%p)\n", This, iface, AutoShow);
358
359 *AutoShow = This->AutoShow;
360
361 return S_OK;
362}
#define S_OK
Definition: intsafe.h:52
static BaseControlWindow * impl_from_IVideoWindow(IVideoWindow *iface)
Definition: window.c:33
#define TRACE(s)
Definition: solgame.cpp:4

◆ BaseControlWindowImpl_get_BackgroundPalette()

HRESULT WINAPI BaseControlWindowImpl_get_BackgroundPalette ( IVideoWindow *  iface,
LONG pBackgroundPalette 
)

Definition at line 395 of file window.c.

396{
397 BaseControlWindow* This = impl_from_IVideoWindow(iface);
398
399 FIXME("(%p/%p)->(%p): stub !!!\n", This, iface, pBackgroundPalette);
400
401 return S_OK;
402}
#define FIXME(fmt,...)
Definition: precomp.h:53

◆ BaseControlWindowImpl_get_BorderColor()

HRESULT WINAPI BaseControlWindowImpl_get_BorderColor ( IVideoWindow *  iface,
LONG Color 
)

Definition at line 584 of file window.c.

585{
586 BaseControlWindow* This = impl_from_IVideoWindow(iface);
587
588 FIXME("(%p/%p)->(%p): stub !!!\n", This, iface, Color);
589
590 return S_OK;
591}

◆ BaseControlWindowImpl_get_Caption()

HRESULT WINAPI BaseControlWindowImpl_get_Caption ( IVideoWindow *  iface,
BSTR strCaption 
)

Definition at line 278 of file window.c.

279{
280 BaseControlWindow* This = impl_from_IVideoWindow(iface);
281
282 TRACE("(%p/%p)->(%p)\n", This, iface, strCaption);
283
284 GetWindowTextW(This->baseWindow.hWnd, (LPWSTR)strCaption, 100);
285
286 return S_OK;
287}
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1384
WCHAR * LPWSTR
Definition: xmlstorage.h:184

◆ BaseControlWindowImpl_get_FullScreenMode()

HRESULT WINAPI BaseControlWindowImpl_get_FullScreenMode ( IVideoWindow *  iface,
LONG FullScreenMode 
)

Definition at line 602 of file window.c.

603{
604 TRACE("(%p)->(%p)\n", iface, FullScreenMode);
605
606 return E_NOTIMPL;
607}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ BaseControlWindowImpl_get_Height()

HRESULT WINAPI BaseControlWindowImpl_get_Height ( IVideoWindow *  iface,
LONG pHeight 
)

Definition at line 519 of file window.c.

520{
521 BaseControlWindow* This = impl_from_IVideoWindow(iface);
522
523 TRACE("(%p/%p)->(%p)\n", This, iface, pHeight);
524
525 *pHeight = This->baseWindow.Height;
526
527 return S_OK;
528}

◆ BaseControlWindowImpl_get_Left()

HRESULT WINAPI BaseControlWindowImpl_get_Left ( IVideoWindow *  iface,
LONG pLeft 
)

Definition at line 440 of file window.c.

441{
442 BaseControlWindow* This = impl_from_IVideoWindow(iface);
443 RECT WindowPos;
444
445 TRACE("(%p/%p)->(%p)\n", This, iface, pLeft);
446 GetWindowRect(This->baseWindow.hWnd, &WindowPos);
447
448 *pLeft = WindowPos.left;
449
450 return S_OK;
451}
LONG left
Definition: windef.h:306
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)

◆ BaseControlWindowImpl_get_MessageDrain()

HRESULT WINAPI BaseControlWindowImpl_get_MessageDrain ( IVideoWindow *  iface,
OAHWND *  Drain 
)

Definition at line 573 of file window.c.

574{
575 BaseControlWindow* This = impl_from_IVideoWindow(iface);
576
577 TRACE("(%p/%p)->(%p)\n", This, iface, Drain);
578
579 *Drain = (OAHWND)This->hwndDrain;
580
581 return S_OK;
582}
LONG_PTR OAHWND
Definition: control.idl:31

◆ BaseControlWindowImpl_get_Owner()

HRESULT WINAPI BaseControlWindowImpl_get_Owner ( IVideoWindow *  iface,
OAHWND *  Owner 
)

Definition at line 551 of file window.c.

552{
553 BaseControlWindow* This = impl_from_IVideoWindow(iface);
554
555 TRACE("(%p/%p)->(%p)\n", This, iface, Owner);
556
557 *(HWND*)Owner = This->hwndOwner;
558
559 return S_OK;
560}
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ SaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ OwnerSize PSID Owner
Definition: rtlfuncs.h:1609

◆ BaseControlWindowImpl_get_Top()

HRESULT WINAPI BaseControlWindowImpl_get_Top ( IVideoWindow *  iface,
LONG pTop 
)

Definition at line 492 of file window.c.

493{
494 BaseControlWindow* This = impl_from_IVideoWindow(iface);
495 RECT WindowPos;
496
497 TRACE("(%p/%p)->(%p)\n", This, iface, pTop);
498 GetWindowRect(This->baseWindow.hWnd, &WindowPos);
499
500 *pTop = WindowPos.top;
501
502 return S_OK;
503}
LONG top
Definition: windef.h:307

◆ BaseControlWindowImpl_get_Visible()

HRESULT WINAPI BaseControlWindowImpl_get_Visible ( IVideoWindow *  iface,
LONG pVisible 
)

Definition at line 415 of file window.c.

416{
417 BaseControlWindow* This = impl_from_IVideoWindow(iface);
418
419 TRACE("(%p/%p)->(%p)\n", This, iface, pVisible);
420
421 *pVisible = IsWindowVisible(This->baseWindow.hWnd);
422
423 return S_OK;
424}
BOOL WINAPI IsWindowVisible(_In_ HWND)

◆ BaseControlWindowImpl_get_Width()

HRESULT WINAPI BaseControlWindowImpl_get_Width ( IVideoWindow *  iface,
LONG pWidth 
)

Definition at line 467 of file window.c.

468{
469 BaseControlWindow* This = impl_from_IVideoWindow(iface);
470
471 TRACE("(%p/%p)->(%p)\n", This, iface, pWidth);
472
473 *pWidth = This->baseWindow.Width;
474
475 return S_OK;
476}

◆ BaseControlWindowImpl_get_WindowState()

HRESULT WINAPI BaseControlWindowImpl_get_WindowState ( IVideoWindow *  iface,
LONG WindowState 
)

Definition at line 373 of file window.c.

374{
376 BaseControlWindow* This = impl_from_IVideoWindow(iface);
377
378 place.length = sizeof(place);
379 GetWindowPlacement(This->baseWindow.hWnd, &place);
380 TRACE("(%p/%p)->(%p)\n", This, iface, WindowState);
381 *WindowState = place.showCmd;
382
383 return S_OK;
384}
static char * place
Definition: getopt.c:55
BOOL WINAPI GetWindowPlacement(_In_ HWND, _Inout_ WINDOWPLACEMENT *)

◆ BaseControlWindowImpl_get_WindowStyle()

HRESULT WINAPI BaseControlWindowImpl_get_WindowStyle ( IVideoWindow *  iface,
LONG WindowStyle 
)

Definition at line 308 of file window.c.

309{
310 BaseControlWindow* This = impl_from_IVideoWindow(iface);
311
312 TRACE("(%p/%p)->(%p)\n", This, iface, WindowStyle);
313
314 *WindowStyle = This->baseWindow.WindowStyles;
315
316 return S_OK;
317}

◆ BaseControlWindowImpl_get_WindowStyleEx()

HRESULT WINAPI BaseControlWindowImpl_get_WindowStyleEx ( IVideoWindow *  iface,
LONG WindowStyleEx 
)

Definition at line 331 of file window.c.

332{
333 BaseControlWindow* This = impl_from_IVideoWindow(iface);
334
335 TRACE("(%p/%p)->(%p)\n", This, iface, WindowStyleEx);
336
337 *WindowStyleEx = GetWindowLongW(This->baseWindow.hWnd, GWL_EXSTYLE);
338
339 return S_OK;
340}
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
#define GWL_EXSTYLE
Definition: winuser.h:854

◆ BaseControlWindowImpl_GetIDsOfNames()

HRESULT WINAPI BaseControlWindowImpl_GetIDsOfNames ( IVideoWindow *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)

Definition at line 243 of file window.c.

244 {
245 BaseControlWindow* This = impl_from_IVideoWindow(iface);
246
247 return BaseDispatchImpl_GetIDsOfNames(&This->baseDispatch, riid, rgszNames, cNames, lcid, rgDispId);
248}
REFIID riid
Definition: atlbase.h:39
HRESULT WINAPI BaseDispatchImpl_GetIDsOfNames(BaseDispatch *This, REFIID riid, OLECHAR **rgszNames, UINT cNames, LCID lcid, DISPID *rgdispid)
Definition: dispatch.c:52

◆ BaseControlWindowImpl_GetMaxIdealImageSize()

HRESULT WINAPI BaseControlWindowImpl_GetMaxIdealImageSize ( IVideoWindow *  iface,
LONG pWidth,
LONG pHeight 
)

Definition at line 699 of file window.c.

700{
701 BaseControlWindow* This = impl_from_IVideoWindow(iface);
702 RECT defaultRect;
703
704 TRACE("(%p/%p)->(%p, %p)\n", This, iface, pWidth, pHeight);
705 defaultRect = This->baseWindow.pFuncsTable->pfnGetDefaultRect(&This->baseWindow);
706
707 *pWidth = defaultRect.right - defaultRect.left;
708 *pHeight = defaultRect.bottom - defaultRect.top;
709
710 return S_OK;
711}
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309

◆ BaseControlWindowImpl_GetMinIdealImageSize()

HRESULT WINAPI BaseControlWindowImpl_GetMinIdealImageSize ( IVideoWindow *  iface,
LONG pWidth,
LONG pHeight 
)

Definition at line 685 of file window.c.

686{
687 BaseControlWindow* This = impl_from_IVideoWindow(iface);
688 RECT defaultRect;
689
690 TRACE("(%p/%p)->(%p, %p)\n", This, iface, pWidth, pHeight);
691 defaultRect = This->baseWindow.pFuncsTable->pfnGetDefaultRect(&This->baseWindow);
692
693 *pWidth = defaultRect.right - defaultRect.left;
694 *pHeight = defaultRect.bottom - defaultRect.top;
695
696 return S_OK;
697}

◆ BaseControlWindowImpl_GetRestorePosition()

HRESULT WINAPI BaseControlWindowImpl_GetRestorePosition ( IVideoWindow *  iface,
LONG pLeft,
LONG pTop,
LONG pWidth,
LONG pHeight 
)

Definition at line 713 of file window.c.

714{
715 BaseControlWindow* This = impl_from_IVideoWindow(iface);
716
717 FIXME("(%p/%p)->(%p, %p, %p, %p): stub !!!\n", This, iface, pLeft, pTop, pWidth, pHeight);
718
719 return S_OK;
720}

◆ BaseControlWindowImpl_GetTypeInfo()

HRESULT WINAPI BaseControlWindowImpl_GetTypeInfo ( IVideoWindow *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)

Definition at line 236 of file window.c.

237{
238 BaseControlWindow* This = impl_from_IVideoWindow(iface);
239
240 return BaseDispatchImpl_GetTypeInfo(&This->baseDispatch, &IID_NULL, iTInfo, lcid, ppTInfo);
241}
#define IID_NULL
Definition: guiddef.h:98
HRESULT WINAPI BaseDispatchImpl_GetTypeInfo(BaseDispatch *This, REFIID riid, UINT itinfo, LCID lcid, ITypeInfo **pptinfo)
Definition: dispatch.c:59

◆ BaseControlWindowImpl_GetTypeInfoCount()

HRESULT WINAPI BaseControlWindowImpl_GetTypeInfoCount ( IVideoWindow *  iface,
UINT pctinfo 
)

Definition at line 229 of file window.c.

230{
231 BaseControlWindow* This = impl_from_IVideoWindow(iface);
232
233 return BaseDispatchImpl_GetTypeInfoCount(&This->baseDispatch, pctinfo);
234}
HRESULT WINAPI BaseDispatchImpl_GetTypeInfoCount(BaseDispatch *This, UINT *pctinfo)
Definition: dispatch.c:70

◆ BaseControlWindowImpl_GetWindowPosition()

HRESULT WINAPI BaseControlWindowImpl_GetWindowPosition ( IVideoWindow *  iface,
LONG pLeft,
LONG pTop,
LONG pWidth,
LONG pHeight 
)

Definition at line 657 of file window.c.

658{
659 BaseControlWindow* This = impl_from_IVideoWindow(iface);
660 RECT WindowPos;
661
662 TRACE("(%p/%p)->(%p, %p, %p, %p)\n", This, iface, pLeft, pTop, pWidth, pHeight);
663 GetWindowRect(This->baseWindow.hWnd, &WindowPos);
664
665 *pLeft = WindowPos.left;
666 *pTop = WindowPos.top;
667 *pWidth = This->baseWindow.Width;
668 *pHeight = This->baseWindow.Height;
669
670 return S_OK;
671}

◆ BaseControlWindowImpl_HideCursor()

HRESULT WINAPI BaseControlWindowImpl_HideCursor ( IVideoWindow *  iface,
LONG  HideCursor 
)

Definition at line 722 of file window.c.

723{
724 BaseControlWindow* This = impl_from_IVideoWindow(iface);
725
726 FIXME("(%p/%p)->(%d): stub !!!\n", This, iface, HideCursor);
727
728 return S_OK;
729}

◆ BaseControlWindowImpl_Invoke()

HRESULT WINAPI BaseControlWindowImpl_Invoke ( IVideoWindow *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExepInfo,
UINT puArgErr 
)

Definition at line 250 of file window.c.

251{
252 BaseControlWindow* This = impl_from_IVideoWindow(iface);
253 ITypeInfo *pTypeInfo;
254 HRESULT hr;
255
256 hr = BaseDispatchImpl_GetTypeInfo(&This->baseDispatch, riid, 1, lcid, &pTypeInfo);
257 if (SUCCEEDED(hr))
258 {
259 hr = ITypeInfo_Invoke(pTypeInfo, &This->IVideoWindow_iface, dispIdMember, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr);
260 ITypeInfo_Release(pTypeInfo);
261 }
262
263 return hr;
264}
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531

◆ BaseControlWindowImpl_IsCursorHidden()

HRESULT WINAPI BaseControlWindowImpl_IsCursorHidden ( IVideoWindow *  iface,
LONG CursorHidden 
)

Definition at line 731 of file window.c.

732{
733 BaseControlWindow* This = impl_from_IVideoWindow(iface);
734
735 FIXME("(%p/%p)->(%p): stub !!!\n", This, iface, CursorHidden);
736
737 return S_OK;
738}

◆ BaseControlWindowImpl_NotifyOwnerMessage()

HRESULT WINAPI BaseControlWindowImpl_NotifyOwnerMessage ( IVideoWindow *  iface,
OAHWND  hwnd,
LONG  uMsg,
LONG_PTR  wParam,
LONG_PTR  lParam 
)

Definition at line 673 of file window.c.

674{
675 BaseControlWindow* This = impl_from_IVideoWindow(iface);
676
677 TRACE("(%p/%p)->(%08lx, %d, %08lx, %08lx)\n", This, iface, hwnd, uMsg, wParam, lParam);
678
679 if (!PostMessageW(This->baseWindow.hWnd, uMsg, wParam, lParam))
680 return E_FAIL;
681
682 return S_OK;
683}
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define E_FAIL
Definition: ddrawi.h:102
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

◆ BaseControlWindowImpl_PossiblyEatMessage()

BOOL WINAPI BaseControlWindowImpl_PossiblyEatMessage ( BaseWindow This,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 164 of file window.c.

165{
166 BaseControlWindow* pControlWindow = impl_from_BaseWindow(This);
167
168 if (pControlWindow->hwndDrain)
169 {
170 switch(uMsg)
171 {
172 case WM_KEYDOWN:
173 case WM_KEYUP:
174 case WM_LBUTTONDBLCLK:
175 case WM_LBUTTONDOWN:
176 case WM_LBUTTONUP:
177 case WM_MBUTTONDBLCLK:
178 case WM_MBUTTONDOWN:
179 case WM_MBUTTONUP:
180 case WM_MOUSEACTIVATE:
181 case WM_MOUSEMOVE:
183 case WM_NCLBUTTONDOWN:
184 case WM_NCLBUTTONUP:
186 case WM_NCMBUTTONDOWN:
187 case WM_NCMBUTTONUP:
188 case WM_NCMOUSEMOVE:
190 case WM_NCRBUTTONDOWN:
191 case WM_NCRBUTTONUP:
192 case WM_RBUTTONDBLCLK:
193 case WM_RBUTTONDOWN:
194 case WM_RBUTTONUP:
195 PostMessageW(pControlWindow->hwndDrain, uMsg, wParam, lParam);
196 return TRUE;
197 default:
198 break;
199 }
200 }
201 return FALSE;
202}
#define FALSE
Definition: types.h:117
static BaseControlWindow * impl_from_BaseWindow(BaseWindow *iface)
Definition: window.c:38
#define WM_KEYUP
Definition: winuser.h:1719
#define WM_LBUTTONDBLCLK
Definition: winuser.h:1781
#define WM_RBUTTONUP
Definition: winuser.h:1783
#define WM_NCRBUTTONDBLCLK
Definition: winuser.h:1700
#define WM_RBUTTONDBLCLK
Definition: winuser.h:1784
#define WM_MOUSEMOVE
Definition: winuser.h:1778
#define WM_NCMBUTTONUP
Definition: winuser.h:1702
#define WM_LBUTTONDOWN
Definition: winuser.h:1779
#define WM_NCLBUTTONDBLCLK
Definition: winuser.h:1697
#define WM_RBUTTONDOWN
Definition: winuser.h:1782
#define WM_NCMOUSEMOVE
Definition: winuser.h:1694
#define WM_NCMBUTTONDOWN
Definition: winuser.h:1701
#define WM_MBUTTONDBLCLK
Definition: winuser.h:1787
#define WM_MOUSEACTIVATE
Definition: winuser.h:1640
#define WM_LBUTTONUP
Definition: winuser.h:1780
#define WM_NCLBUTTONUP
Definition: winuser.h:1696
#define WM_NCRBUTTONUP
Definition: winuser.h:1699
#define WM_KEYDOWN
Definition: winuser.h:1718
#define WM_NCMBUTTONDBLCLK
Definition: winuser.h:1703
#define WM_MBUTTONUP
Definition: winuser.h:1786
#define WM_NCLBUTTONDOWN
Definition: winuser.h:1695
#define WM_MBUTTONDOWN
Definition: winuser.h:1785
#define WM_NCRBUTTONDOWN
Definition: winuser.h:1698

◆ BaseControlWindowImpl_put_AutoShow()

HRESULT WINAPI BaseControlWindowImpl_put_AutoShow ( IVideoWindow *  iface,
LONG  AutoShow 
)

Definition at line 342 of file window.c.

343{
344 BaseControlWindow* This = impl_from_IVideoWindow(iface);
345
346 TRACE("(%p/%p)->(%d)\n", This, iface, AutoShow);
347
348 This->AutoShow = AutoShow;
349
350 return S_OK;
351}

◆ BaseControlWindowImpl_put_BackgroundPalette()

HRESULT WINAPI BaseControlWindowImpl_put_BackgroundPalette ( IVideoWindow *  iface,
LONG  BackgroundPalette 
)

Definition at line 386 of file window.c.

387{
388 BaseControlWindow* This = impl_from_IVideoWindow(iface);
389
390 FIXME("(%p/%p)->(%d): stub !!!\n", This, iface, BackgroundPalette);
391
392 return S_OK;
393}

◆ BaseControlWindowImpl_put_BorderColor()

HRESULT WINAPI BaseControlWindowImpl_put_BorderColor ( IVideoWindow *  iface,
LONG  Color 
)

Definition at line 593 of file window.c.

594{
595 BaseControlWindow* This = impl_from_IVideoWindow(iface);
596
597 FIXME("(%p/%p)->(%d): stub !!!\n", This, iface, Color);
598
599 return S_OK;
600}

◆ BaseControlWindowImpl_put_Caption()

HRESULT WINAPI BaseControlWindowImpl_put_Caption ( IVideoWindow *  iface,
BSTR  strCaption 
)

Definition at line 266 of file window.c.

267{
268 BaseControlWindow* This = impl_from_IVideoWindow(iface);
269
270 TRACE("(%p/%p)->(%s (%p))\n", This, iface, debugstr_w(strCaption), strCaption);
271
272 if (!SetWindowTextW(This->baseWindow.hWnd, strCaption))
273 return E_FAIL;
274
275 return S_OK;
276}
#define debugstr_w
Definition: kernel32.h:32
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)

◆ BaseControlWindowImpl_put_FullScreenMode()

HRESULT WINAPI BaseControlWindowImpl_put_FullScreenMode ( IVideoWindow *  iface,
LONG  FullScreenMode 
)

Definition at line 609 of file window.c.

610{
611 TRACE("(%p)->(%d)\n", iface, FullScreenMode);
612 return E_NOTIMPL;
613}

◆ BaseControlWindowImpl_put_Height()

HRESULT WINAPI BaseControlWindowImpl_put_Height ( IVideoWindow *  iface,
LONG  Height 
)

Definition at line 505 of file window.c.

506{
507 BaseControlWindow* This = impl_from_IVideoWindow(iface);
508
509 TRACE("(%p/%p)->(%d)\n", This, iface, Height);
510
511 if (!SetWindowPos(This->baseWindow.hWnd, NULL, 0, 0, This->baseWindow.Width, Height, SWP_NOZORDER|SWP_NOMOVE))
512 return E_FAIL;
513
514 This->baseWindow.Height = Height;
515
516 return S_OK;
517}
_In_ HFONT _Out_ PUINT Height
Definition: font.h:88
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SWP_NOMOVE
Definition: winuser.h:1247
#define SWP_NOZORDER
Definition: winuser.h:1250

◆ BaseControlWindowImpl_put_Left()

HRESULT WINAPI BaseControlWindowImpl_put_Left ( IVideoWindow *  iface,
LONG  Left 
)

Definition at line 426 of file window.c.

427{
428 BaseControlWindow* This = impl_from_IVideoWindow(iface);
429 RECT WindowPos;
430
431 TRACE("(%p/%p)->(%d)\n", This, iface, Left);
432
433 GetWindowRect(This->baseWindow.hWnd, &WindowPos);
434 if (!SetWindowPos(This->baseWindow.hWnd, NULL, Left, WindowPos.top, 0, 0, SWP_NOZORDER|SWP_NOSIZE))
435 return E_FAIL;
436
437 return S_OK;
438}
#define SWP_NOSIZE
Definition: winuser.h:1248

◆ BaseControlWindowImpl_put_MessageDrain()

HRESULT WINAPI BaseControlWindowImpl_put_MessageDrain ( IVideoWindow *  iface,
OAHWND  Drain 
)

Definition at line 562 of file window.c.

563{
564 BaseControlWindow* This = impl_from_IVideoWindow(iface);
565
566 TRACE("(%p/%p)->(%08x)\n", This, iface, (DWORD) Drain);
567
568 This->hwndDrain = (HWND)Drain;
569
570 return S_OK;
571}
HANDLE HWND
Definition: compat.h:19
unsigned long DWORD
Definition: ntddk_ex.h:95

◆ BaseControlWindowImpl_put_Owner()

HRESULT WINAPI BaseControlWindowImpl_put_Owner ( IVideoWindow *  iface,
OAHWND  Owner 
)

Definition at line 530 of file window.c.

531{
532 BaseControlWindow* This = impl_from_IVideoWindow(iface);
533
534 TRACE("(%p/%p)->(%08x)\n", This, iface, (DWORD) Owner);
535
536 This->hwndOwner = (HWND)Owner;
537 SetParent(This->baseWindow.hWnd, This->hwndOwner);
538 if (This->baseWindow.WindowStyles & WS_CHILD)
539 {
540 LONG old = GetWindowLongW(This->baseWindow.hWnd, GWL_STYLE);
541 if (old != This->baseWindow.WindowStyles)
542 {
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);
545 }
546 }
547
548 return S_OK;
549}
#define WS_CHILD
Definition: pedump.c:617
long LONG
Definition: pedump.c:60
#define SWP_FRAMECHANGED
Definition: winuser.h:1243
HWND WINAPI SetParent(_In_ HWND, _In_opt_ HWND)
LONG WINAPI SetWindowLongW(_In_ HWND, _In_ int, _In_ LONG)
#define GWL_STYLE
Definition: winuser.h:855

◆ BaseControlWindowImpl_put_Top()

HRESULT WINAPI BaseControlWindowImpl_put_Top ( IVideoWindow *  iface,
LONG  Top 
)

Definition at line 478 of file window.c.

479{
480 BaseControlWindow* This = impl_from_IVideoWindow(iface);
481 RECT WindowPos;
482
483 TRACE("(%p/%p)->(%d)\n", This, iface, Top);
484 GetWindowRect(This->baseWindow.hWnd, &WindowPos);
485
486 if (!SetWindowPos(This->baseWindow.hWnd, NULL, WindowPos.left, Top, 0, 0, SWP_NOZORDER|SWP_NOSIZE))
487 return E_FAIL;
488
489 return S_OK;
490}
static LPHIST_ENTRY Top
Definition: history.c:53

◆ BaseControlWindowImpl_put_Visible()

HRESULT WINAPI BaseControlWindowImpl_put_Visible ( IVideoWindow *  iface,
LONG  Visible 
)

Definition at line 404 of file window.c.

405{
406 BaseControlWindow* This = impl_from_IVideoWindow(iface);
407
408 TRACE("(%p/%p)->(%d)\n", This, iface, Visible);
409
410 ShowWindow(This->baseWindow.hWnd, Visible ? SW_SHOW : SW_HIDE);
411
412 return S_OK;
413}
#define SW_HIDE
Definition: winuser.h:771
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define SW_SHOW
Definition: winuser.h:778

◆ BaseControlWindowImpl_put_Width()

HRESULT WINAPI BaseControlWindowImpl_put_Width ( IVideoWindow *  iface,
LONG  Width 
)

Definition at line 453 of file window.c.

454{
455 BaseControlWindow* This = impl_from_IVideoWindow(iface);
456
457 TRACE("(%p/%p)->(%d)\n", This, iface, Width);
458
459 if (!SetWindowPos(This->baseWindow.hWnd, NULL, 0, 0, Width, This->baseWindow.Height, SWP_NOZORDER|SWP_NOMOVE))
460 return E_FAIL;
461
462 This->baseWindow.Width = Width;
463
464 return S_OK;
465}
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
Definition: font.h:89

◆ BaseControlWindowImpl_put_WindowState()

HRESULT WINAPI BaseControlWindowImpl_put_WindowState ( IVideoWindow *  iface,
LONG  WindowState 
)

Definition at line 364 of file window.c.

365{
366 BaseControlWindow* This = impl_from_IVideoWindow(iface);
367
368 TRACE("(%p/%p)->(%d)\n", This, iface, WindowState);
369 ShowWindow(This->baseWindow.hWnd, WindowState);
370 return S_OK;
371}

◆ BaseControlWindowImpl_put_WindowStyle()

HRESULT WINAPI BaseControlWindowImpl_put_WindowStyle ( IVideoWindow *  iface,
LONG  WindowStyle 
)

Definition at line 289 of file window.c.

290{
291 BaseControlWindow* This = impl_from_IVideoWindow(iface);
292 LONG old;
293
294 old = GetWindowLongW(This->baseWindow.hWnd, GWL_STYLE);
295
296 TRACE("(%p/%p)->(%x -> %x)\n", This, iface, old, WindowStyle);
297
299 return E_INVALIDARG;
300
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;
304
305 return S_OK;
306}
#define E_INVALIDARG
Definition: ddrawi.h:101
#define WS_MAXIMIZE
Definition: pedump.c:623
#define WS_VSCROLL
Definition: pedump.c:627
#define WS_MINIMIZE
Definition: pedump.c:622
#define WS_DISABLED
Definition: pedump.c:621
#define WS_HSCROLL
Definition: pedump.c:628

◆ BaseControlWindowImpl_put_WindowStyleEx()

HRESULT WINAPI BaseControlWindowImpl_put_WindowStyleEx ( IVideoWindow *  iface,
LONG  WindowStyleEx 
)

Definition at line 319 of file window.c.

320{
321 BaseControlWindow* This = impl_from_IVideoWindow(iface);
322
323 TRACE("(%p/%p)->(%d)\n", This, iface, WindowStyleEx);
324
325 if (!SetWindowLongW(This->baseWindow.hWnd, GWL_EXSTYLE, WindowStyleEx))
326 return E_FAIL;
327
328 return S_OK;
329}

◆ BaseControlWindowImpl_SetWindowForeground()

HRESULT WINAPI BaseControlWindowImpl_SetWindowForeground ( IVideoWindow *  iface,
LONG  Focus 
)

Definition at line 615 of file window.c.

616{
617 BaseControlWindow* This = impl_from_IVideoWindow(iface);
618 BOOL ret;
619 IPin* pPin;
620 HRESULT hr;
621
622 TRACE("(%p/%p)->(%d)\n", This, iface, Focus);
623
624 if ((Focus != FALSE) && (Focus != TRUE))
625 return E_INVALIDARG;
626
627 hr = IPin_ConnectedTo(&This->pPin->IPin_iface, &pPin);
628 if ((hr != S_OK) || !pPin)
629 return VFW_E_NOT_CONNECTED;
630
631 if (Focus)
632 ret = SetForegroundWindow(This->baseWindow.hWnd);
633 else
634 ret = SetWindowPos(This->baseWindow.hWnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
635
636 if (!ret)
637 return E_FAIL;
638
639 return S_OK;
640}
unsigned int BOOL
Definition: ntddk_ex.h:94
Definition: axcore.idl:92
#define VFW_E_NOT_CONNECTED
Definition: vfwmsgs.h:48
int ret
BOOL WINAPI SetForegroundWindow(_In_ HWND)
#define HWND_TOP
Definition: winuser.h:1210

◆ BaseControlWindowImpl_SetWindowPosition()

HRESULT WINAPI BaseControlWindowImpl_SetWindowPosition ( IVideoWindow *  iface,
LONG  Left,
LONG  Top,
LONG  Width,
LONG  Height 
)

Definition at line 642 of file window.c.

643{
644 BaseControlWindow* This = impl_from_IVideoWindow(iface);
645
646 TRACE("(%p/%p)->(%d, %d, %d, %d)\n", This, iface, Left, Top, Width, Height);
647
648 if (!SetWindowPos(This->baseWindow.hWnd, NULL, Left, Top, Width, Height, SWP_NOZORDER))
649 return E_FAIL;
650
651 This->baseWindow.Width = Width;
652 This->baseWindow.Height = Height;
653
654 return S_OK;
655}

◆ BaseWindow_Destroy()

HRESULT WINAPI BaseWindow_Destroy ( BaseWindow This)

Definition at line 91 of file window.c.

92{
93 if (This->hWnd)
95
97 return S_OK;
98}
#define GetProcessHeap()
Definition: compat.h:736
#define HeapFree(x, y, z)
Definition: compat.h:735

◆ BaseWindow_Init()

HRESULT WINAPI BaseWindow_Init ( BaseWindow pBaseWindow,
const BaseWindowFuncTable pFuncsTable 
)

Definition at line 80 of file window.c.

81{
82 if (!pFuncsTable)
83 return E_INVALIDARG;
84
85 ZeroMemory(pBaseWindow,sizeof(BaseWindow));
86 pBaseWindow->pFuncsTable = pFuncsTable;
87
88 return S_OK;
89}
const struct BaseWindowFuncTable * pFuncsTable
Definition: strmbase.h:392
#define ZeroMemory
Definition: winbase.h:1737

Referenced by BaseControlWindow_Init().

◆ BaseWindowImpl_DoneWithWindow()

HRESULT WINAPI BaseWindowImpl_DoneWithWindow ( BaseWindow This)

Definition at line 143 of file window.c.

144{
145 if (!This->hWnd)
146 return S_OK;
147
148 if (This->hDC)
149 ReleaseDC(This->hWnd, This->hDC);
150 This->hDC = NULL;
151
152 DestroyWindow(This->hWnd);
153 This->hWnd = NULL;
154
155 return S_OK;
156}
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
BOOL WINAPI DestroyWindow(_In_ HWND)

Referenced by BaseControlWindow_Destroy(), BaseWindow_Destroy(), CreateRenderingWindow(), and VMR9_SurfaceAllocator_TerminateDevice().

◆ BaseWindowImpl_GetDefaultRect()

RECT WINAPI BaseWindowImpl_GetDefaultRect ( BaseWindow This)

Definition at line 158 of file window.c.

159{
160 static RECT defRect = {0, 0, 800, 600};
161 return defRect;
162}

◆ BaseWindowImpl_OnReceiveMessage()

LRESULT WINAPI BaseWindowImpl_OnReceiveMessage ( BaseWindow This,
HWND  hwnd,
INT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 56 of file window.c.

57{
58 if (This->pFuncsTable->pfnPossiblyEatMessage && This->pFuncsTable->pfnPossiblyEatMessage(This, uMsg, wParam, lParam))
59 return 0;
60
61 switch (uMsg)
62 {
63 case WM_SIZE:
64 if (This->pFuncsTable->pfnOnSize)
65 return This->pFuncsTable->pfnOnSize(This, LOWORD(lParam), HIWORD(lParam));
66 else
68 }
69
70 return DefWindowProcW(hwnd, uMsg, wParam, lParam);
71}
#define LOWORD(l)
Definition: pedump.c:82
BOOL WINAPI BaseWindowImpl_OnSize(BaseWindow *This, LONG Width, LONG Height)
Definition: window.c:73
#define HIWORD(l)
Definition: typedefs.h:247
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_SIZE
Definition: winuser.h:1614

Referenced by WndProcW().

◆ BaseWindowImpl_OnSize()

BOOL WINAPI BaseWindowImpl_OnSize ( BaseWindow This,
LONG  Width,
LONG  Height 
)

Definition at line 73 of file window.c.

74{
75 This->Width = Width;
76 This->Height = Height;
77 return TRUE;
78}

Referenced by BaseWindowImpl_OnReceiveMessage(), VideoRenderer_OnSize(), and VMR9_OnSize().

◆ BaseWindowImpl_PrepareWindow()

HRESULT WINAPI BaseWindowImpl_PrepareWindow ( BaseWindow This)

Definition at line 100 of file window.c.

101{
102 WNDCLASSW winclass;
103 static const WCHAR windownameW[] = { 'A','c','t','i','v','e','M','o','v','i','e',' ','W','i','n','d','o','w',0 };
104
105 This->pClassName = This->pFuncsTable->pfnGetClassWindowStyles(This, &This->ClassStyles, &This->WindowStyles, &This->WindowStylesEx);
106
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;
115 winclass.lpszMenuName = NULL;
116 winclass.lpszClassName = This->pClassName;
118 {
119 ERR("Unable to register window class: %u\n", GetLastError());
120 return E_FAIL;
121 }
122
123 This->hWnd = CreateWindowExW(This->WindowStylesEx,
124 This->pClassName, windownameW,
125 This->WindowStyles,
127 CW_USEDEFAULT, NULL, NULL, This->hInstance,
128 NULL);
129
130 if (!This->hWnd)
131 {
132 ERR("Unable to create window\n");
133 return E_FAIL;
134 }
135
137
138 This->hDC = GetDC(This->hWnd);
139
140 return S_OK;
141}
#define ERR(fmt,...)
Definition: precomp.h:57
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
static LRESULT CALLBACK WndProcW(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: window.c:43
LPCWSTR lpszClassName
Definition: winuser.h:3188
LPCWSTR lpszMenuName
Definition: winuser.h:3187
HBRUSH hbrBackground
Definition: winuser.h:3186
HICON hIcon
Definition: winuser.h:3184
HINSTANCE hInstance
Definition: winuser.h:3183
int cbClsExtra
Definition: winuser.h:3181
UINT style
Definition: winuser.h:3179
WNDPROC lpfnWndProc
Definition: winuser.h:3180
int cbWndExtra
Definition: winuser.h:3182
HCURSOR hCursor
Definition: winuser.h:3185
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define ERROR_CLASS_ALREADY_EXISTS
Definition: winerror.h:891
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define BLACK_BRUSH
Definition: wingdi.h:896
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
HDC WINAPI GetDC(_In_opt_ HWND)
#define CW_USEDEFAULT
Definition: winuser.h:225
#define SetWindowLongPtrW
Definition: winuser.h:5358
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by MessageLoop().

◆ impl_from_BaseWindow()

static BaseControlWindow * impl_from_BaseWindow ( BaseWindow iface)
inlinestatic

Definition at line 38 of file window.c.

39{
40 return CONTAINING_RECORD(iface, BaseControlWindow, baseWindow);
41}
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

Referenced by BaseControlWindowImpl_PossiblyEatMessage().

◆ impl_from_IVideoWindow()

static BaseControlWindow * impl_from_IVideoWindow ( IVideoWindow *  iface)
inlinestatic

Definition at line 33 of file window.c.

34{
35 return CONTAINING_RECORD(iface, BaseControlWindow, IVideoWindow_iface);
36}

Referenced by BaseControlWindowImpl_get_AutoShow(), BaseControlWindowImpl_get_BackgroundPalette(), BaseControlWindowImpl_get_BorderColor(), BaseControlWindowImpl_get_Caption(), BaseControlWindowImpl_get_Height(), BaseControlWindowImpl_get_Left(), BaseControlWindowImpl_get_MessageDrain(), BaseControlWindowImpl_get_Owner(), BaseControlWindowImpl_get_Top(), BaseControlWindowImpl_get_Visible(), BaseControlWindowImpl_get_Width(), BaseControlWindowImpl_get_WindowState(), BaseControlWindowImpl_get_WindowStyle(), BaseControlWindowImpl_get_WindowStyleEx(), BaseControlWindowImpl_GetIDsOfNames(), BaseControlWindowImpl_GetMaxIdealImageSize(), BaseControlWindowImpl_GetMinIdealImageSize(), BaseControlWindowImpl_GetRestorePosition(), BaseControlWindowImpl_GetTypeInfo(), BaseControlWindowImpl_GetTypeInfoCount(), BaseControlWindowImpl_GetWindowPosition(), BaseControlWindowImpl_HideCursor(), BaseControlWindowImpl_Invoke(), BaseControlWindowImpl_IsCursorHidden(), BaseControlWindowImpl_NotifyOwnerMessage(), BaseControlWindowImpl_put_AutoShow(), BaseControlWindowImpl_put_BackgroundPalette(), BaseControlWindowImpl_put_BorderColor(), BaseControlWindowImpl_put_Caption(), BaseControlWindowImpl_put_Height(), BaseControlWindowImpl_put_Left(), BaseControlWindowImpl_put_MessageDrain(), BaseControlWindowImpl_put_Owner(), BaseControlWindowImpl_put_Top(), BaseControlWindowImpl_put_Visible(), BaseControlWindowImpl_put_Width(), BaseControlWindowImpl_put_WindowState(), BaseControlWindowImpl_put_WindowStyle(), BaseControlWindowImpl_put_WindowStyleEx(), BaseControlWindowImpl_SetWindowForeground(), and BaseControlWindowImpl_SetWindowPosition().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( strmbase  )

◆ WndProcW()

static LRESULT CALLBACK WndProcW ( HWND  hwnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 43 of file window.c.

44{
46
47 if (!This)
48 return DefWindowProcW(hwnd, uMsg, wParam, lParam);
49
50 if (This->pFuncsTable->pfnOnReceiveMessage)
51 return This->pFuncsTable->pfnOnReceiveMessage(This, hwnd, uMsg, wParam, lParam);
52 else
54}
LRESULT WINAPI BaseWindowImpl_OnReceiveMessage(BaseWindow *This, HWND hwnd, INT uMsg, WPARAM wParam, LPARAM lParam)
Definition: window.c:56
#define GetWindowLongPtrW
Definition: winuser.h:4832

Referenced by BaseWindowImpl_PrepareWindow().