soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
SWindowProxy.h
1#ifndef __SWINDOWPROXY__H__
2#define __SWINDOWPROXY__H__
3
4SNSBEGIN
5
6template <class T>
7class TWindowProxy
8 : public T
9 , public SWindow {
10public:
11
12 STDMETHOD_(long, AddRef)(THIS) OVERRIDE
13 {
14 return SWindow::AddRef();
15 }
16 STDMETHOD_(long, Release)(THIS) OVERRIDE
17 {
18 return SWindow::Release();
19 }
20 STDMETHOD_(void, OnFinalRelease)(THIS) OVERRIDE
21 {
23 }
24
25 STDMETHOD_(IWindow *, ToIWindow)(THIS) OVERRIDE
26 {
27 return this;
28 }
29
30 STDMETHOD_(HRESULT, QueryInterface)(REFGUID id, IObjRef **ppRet) OVERRIDE
31 {
32 if (id == T::GetIID())
33 {
34 *ppRet = (T *)this;
35 AddRef();
36 return S_OK;
37 }
38 else
39 {
40 return E_NOTIMPL;
41 }
42 }
43};
44
45SNSEND
46#endif // __SWINDOWPROXY__H__
Base class for SOUI DUI windows.
Definition SWnd.h:286
void OnFinalRelease()
Called when the last reference to the object is released.
Definition Swnd.cpp:198