1#ifndef __SNATIVEWNDPROXY__H__
2#define __SNATIVEWNDPROXY__H__
11 STDMETHOD_(
long, AddRef)(THIS)
15 STDMETHOD_(
long, Release)(THIS)
19 STDMETHOD_(
void, OnFinalRelease)(THIS)
23 STDMETHOD_(
int, GetID)(THIS) SCONST
27 STDMETHOD_(
void, SetID)(THIS_
int nID)
32 STDMETHOD_(HWND, CreateNative)
33 (THIS_ LPCTSTR lpWindowName,
42 LPVOID lpParam) OVERRIDE
45 hWndParent,nID, lpParam);
48 STDMETHOD_(HWND, GetHwnd)(THIS) OVERRIDE
53 STDMETHOD_(BOOL, SubclassWindow)(THIS_ HWND hWnd) OVERRIDE
57 STDMETHOD_(HWND, UnsubclassWindow)(THIS_ BOOL bForce ) OVERRIDE
61 STDMETHOD_(
const MSG *, GetCurrentMessage)(THIS) SCONST OVERRIDE
65 STDMETHOD_(
int, GetDlgCtrlID)(THIS) SCONST OVERRIDE
69 STDMETHOD_(DWORD, GetStyle)(THIS) SCONST OVERRIDE
73 STDMETHOD_(DWORD, GetExStyle)(THIS) SCONST OVERRIDE
77 STDMETHOD_(LONG_PTR, GetWindowLongPtr)(THIS_
int nIndex) SCONST OVERRIDE
81 STDMETHOD_(LONG_PTR, SetWindowLongPtr)(THIS_
int nIndex, LONG_PTR dwNewLong) OVERRIDE
85 STDMETHOD_(HWND, GetParent)(THIS) OVERRIDE
89 STDMETHOD_(HWND, SetParent)(THIS_ HWND hWndNewParent) OVERRIDE
93 STDMETHOD_(BOOL, IsWindowEnabled)(THIS) SCONST OVERRIDE
97 STDMETHOD_(BOOL, ModifyStyle)(THIS_ DWORD dwRemove, DWORD dwAdd, UINT nFlags = 0) OVERRIDE
101 STDMETHOD_(BOOL, ModifyStyleEx)(THIS_ DWORD dwRemove, DWORD dwAdd, UINT nFlags = 0) OVERRIDE
105 STDMETHOD_(BOOL, SetWindowPos)
106 (THIS_ HWND hWndInsertAfter,
int x,
int y,
int cx,
int cy, UINT nFlags) OVERRIDE
110 STDMETHOD_(BOOL, CenterWindow)(THIS_ HWND hWndCenter DEF_VAL(0)) OVERRIDE
114 STDMETHOD_(BOOL, IsWindow)(CTHIS) SCONST OVERRIDE
118 STDMETHOD_(BOOL, Invalidate)(THIS_ BOOL bErase = TRUE) OVERRIDE
122 STDMETHOD_(BOOL, InvalidateRect)(THIS_ LPCRECT lpRect, BOOL bErase = TRUE) OVERRIDE
126 STDMETHOD_(BOOL, GetWindowRect)(THIS_ LPRECT lpRect) SCONST OVERRIDE
130 STDMETHOD_(BOOL, GetClientRect)(THIS_ LPRECT lpRect) SCONST OVERRIDE
134 STDMETHOD_(BOOL, ClientToScreen)(THIS_ LPPOINT lpPoint) SCONST OVERRIDE
138 STDMETHOD_(BOOL, ClientToScreen2)(THIS_ LPRECT lpRect) SCONST OVERRIDE
142 STDMETHOD_(BOOL, ScreenToClient)(THIS_ LPPOINT lpPoint) SCONST OVERRIDE
146 STDMETHOD_(BOOL, ScreenToClient2)(THIS_ LPRECT lpRect) SCONST OVERRIDE
150 STDMETHOD_(
int, MapWindowPoints)
151 (THIS_ HWND hWndTo, LPPOINT lpPoint, UINT nCount) SCONST OVERRIDE
155 STDMETHOD_(
int, MapWindowRect)(THIS_ HWND hWndTo, LPRECT lpRect) SCONST OVERRIDE
159 STDMETHOD_(UINT_PTR, SetTimer)
160 (THIS_ UINT_PTR nIDEvent,
162 void(CALLBACK *lpfnTimer)(HWND, UINT, UINT_PTR, DWORD) = NULL) OVERRIDE
166 STDMETHOD_(BOOL, KillTimer)(THIS_ UINT_PTR nIDEvent) OVERRIDE
170 STDMETHOD_(HDC, GetDC)(THIS) OVERRIDE
174 STDMETHOD_(HDC, GetWindowDC)(THIS) OVERRIDE
178 STDMETHOD_(
int, ReleaseDC)(THIS_ HDC hDC) OVERRIDE
182 STDMETHOD_(BOOL, CreateCaret)(THIS_ HBITMAP hBitmap,
int nWidth,
int nHeight) OVERRIDE
186 STDMETHOD_(BOOL, HideCaret)(THIS) OVERRIDE
190 STDMETHOD_(BOOL, ShowCaret)(THIS) OVERRIDE
194 STDMETHOD_(HWND, SetCapture)(THIS) OVERRIDE
199 STDMETHOD_(HWND, GetCapture)(THIS) OVERRIDE
204 STDMETHOD_(BOOL, ReleaseCapture)(THIS) OVERRIDE
209 STDMETHOD_(HWND, SetFocus)(THIS) OVERRIDE
213 STDMETHOD_(LRESULT, SendMessage)
214 (THIS_ UINT message, WPARAM wParam = 0, LPARAM lParam = 0) OVERRIDE
218 STDMETHOD_(BOOL, PostMessage)(THIS_ UINT message, WPARAM wParam = 0, LPARAM lParam = 0) OVERRIDE
222 STDMETHOD_(BOOL, SendNotifyMessage)
223 (THIS_ UINT message, WPARAM wParam = 0, LPARAM lParam = 0) OVERRIDE
227 STDMETHOD_(BOOL, SetWindowText)(THIS_ LPCTSTR lpszString) OVERRIDE
231 STDMETHOD_(
int, GetWindowText)(THIS_ LPTSTR lpszStringBuf,
int nMaxCount) SCONST OVERRIDE
235 STDMETHOD_(BOOL, IsIconic)(THIS) SCONST OVERRIDE
239 STDMETHOD_(BOOL, IsZoomed)(THIS) SCONST OVERRIDE
243 STDMETHOD_(BOOL, IsWindowVisible)(THIS) SCONST OVERRIDE
247 STDMETHOD_(BOOL, MoveWindow)
248 (THIS_
int x,
int y,
int nWidth,
int nHeight, BOOL bRepaint = TRUE) OVERRIDE
252 STDMETHOD_(BOOL, MoveWindow2)(THIS_ LPCRECT lpRect, BOOL bRepaint = TRUE) OVERRIDE
256 STDMETHOD_(BOOL, ShowWindow)(THIS_
int nCmdShow) OVERRIDE
260 STDMETHOD_(
int, SetWindowRgn)(THIS_ HRGN hRgn, BOOL bRedraw = TRUE) OVERRIDE
264 STDMETHOD_(BOOL, SetLayeredWindowAttributes)
265 (THIS_ COLORREF crKey, BYTE byAlpha, DWORD dwFlags) OVERRIDE
269 STDMETHOD_(BOOL, UpdateLayeredWindow)
276 BLENDFUNCTION *pblend,
283 STDMETHOD_(
void, SetMsgHandler)(THIS_ FunMsgHandler fun,
void *ctx) OVERRIDE
288 STDMETHOD_(MsgHandlerInfo *, GetMsgHandler)(THIS) OVERRIDE{
Class for managing native window operations.
BOOL IsIconic() SCONST OVERRIDE
Checks if the window is iconic (minimized).
BOOL IsZoomed() SCONST OVERRIDE
Checks if the window is zoomed (maximized).
BOOL ClientToScreen2(LPRECT lpRect) SCONST OVERRIDE
Converts client rectangle coordinates to screen coordinates.
BOOL ScreenToClient(LPPOINT lpPoint) SCONST OVERRIDE
Converts screen coordinates to client coordinates.
int SetWindowRgn(HRGN hRgn, BOOL bRedraw=TRUE) OVERRIDE
Sets the window region.
int MapWindowRect(HWND hWndTo, LPRECT lpRect) SCONST OVERRIDE
Maps a rectangle from one window to another.
HDC GetDC() OVERRIDE
Retrieves a device context for the window.
HWND SetCapture() OVERRIDE
Sets the window to capture the mouse.
BOOL GetWindowRect(LPRECT lpRect) SCONST OVERRIDE
Retrieves the window rectangle.
HWND GetCapture() OVERRIDE
Retrieves the handle to the window that has captured the mouse.
BOOL ReleaseCapture() OVERRIDE
Releases the mouse capture.
int MapWindowPoints(HWND hWndTo, LPPOINT lpPoint, UINT nCount) SCONST OVERRIDE
Maps points from one window to another.
BOOL SetLayeredWindowAttributes(COLORREF crKey, BYTE bAlpha, DWORD dwFlags) OVERRIDE
Sets the layered window attributes.
BOOL IsWindowVisible() SCONST OVERRIDE
Checks if the window is visible.
BOOL Invalidate(BOOL bErase=TRUE) OVERRIDE
Invalidates the entire window.
BOOL IsWindow() SCONST OVERRIDE
Checks if the handle is a valid window handle.
BOOL IsWindowEnabled() SCONST OVERRIDE
Checks if the window is enabled.
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0) OVERRIDE
Sends a message to the window.
const MSG * GetCurrentMessage() SCONST OVERRIDE
Retrieves the current message being processed.
void SetMsgHandler(FunMsgHandler fun, void *ctx) OVERRIDE
Sets the message handler for the window.
BOOL MoveWindow(int x, int y, int nWidth, int nHeight, BOOL bRepaint=TRUE) OVERRIDE
Moves the window to the specified position and resizes it.
BOOL SendNotifyMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0) OVERRIDE
Sends a notify message to the window.
UINT_PTR SetTimer(UINT_PTR nIDEvent, UINT nElapse, void(CALLBACK *lpfnTimer)(HWND, UINT, UINT_PTR, DWORD)=NULL) OVERRIDE
Sets a timer for the window.
HWND UnsubclassWindow(BOOL bForce=FALSE) OVERRIDE
Unsubclasses a window.
BOOL ShowCaret() OVERRIDE
Shows the caret.
BOOL SubclassWindow(HWND hWnd) OVERRIDE
Subclasses an existing window.
BOOL PostMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0) OVERRIDE
Posts a message to the window.
DWORD GetStyle() SCONST OVERRIDE
Retrieves the window style.
int GetID() SCONST
Retrieves the window ID.
HWND GetParent() OVERRIDE
Retrieves the handle to the parent window.
HWND SetFocus() OVERRIDE
Sets the input focus to the window.
DWORD GetExStyle() SCONST OVERRIDE
Retrieves the extended window style.
HWND SetParent(HWND hWndNewParent) OVERRIDE
Sets the handle to the parent window.
BOOL SetWindowText(LPCTSTR lpszString) OVERRIDE
Sets the window text.
BOOL ClientToScreen(LPPOINT lpPoint) SCONST OVERRIDE
Converts client coordinates to screen coordinates.
BOOL ShowWindow(int nCmdShow) OVERRIDE
Sets the show state of the window.
BOOL KillTimer(UINT_PTR nIDEvent) OVERRIDE
Kills a timer for the window.
void SetID(int nID)
Sets the window ID.
int GetWindowText(LPTSTR lpszStringBuf, int nMaxCount) SCONST OVERRIDE
Retrieves the window text.
BOOL CreateCaret(HBITMAP hBitmap, int nWidth, int nHeight) OVERRIDE
Creates a caret for the window.
LONG_PTR SetWindowLongPtr(int nIndex, LONG_PTR dwNewLong) OVERRIDE
Sets the long pointer value at the specified index.
BOOL CenterWindow(HWND hWndCenter=0) OVERRIDE
Centers the window relative to another window.
BOOL GetClientRect(LPRECT lpRect) SCONST OVERRIDE
Retrieves the client rectangle.
BOOL ModifyStyle(DWORD dwRemove, DWORD dwAdd, UINT nFlags=0) OVERRIDE
Modifies the window style.
HDC GetWindowDC() OVERRIDE
Retrieves a device context for the entire window.
HWND CreateNative(LPCTSTR lpWindowName, DWORD dwStyle, DWORD dwExStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, int nID=0, LPVOID lpParam=0) OVERRIDE
Creates a native window.
BOOL ModifyStyleEx(DWORD dwRemove, DWORD dwAdd, UINT nFlags=0) OVERRIDE
Modifies the extended window style.
BOOL SetWindowPos(HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags) OVERRIDE
Sets the window position.
HWND GetHwnd() OVERRIDE
Retrieves the handle to the window.
int ReleaseDC(HDC hDC) OVERRIDE
Releases a device context.
BOOL HideCaret() OVERRIDE
Hides the caret.
BOOL ScreenToClient2(LPRECT lpRect) SCONST OVERRIDE
Converts screen rectangle coordinates to client coordinates.
int GetDlgCtrlID() SCONST OVERRIDE
Retrieves the dialog control ID.
MsgHandlerInfo * GetMsgHandler() OVERRIDE
Retrieves the message handler for the window.
LONG_PTR GetWindowLongPtr(int nIndex) SCONST OVERRIDE
Retrieves the long pointer value at the specified index.
BOOL UpdateLayeredWindow(HDC hdcDst, POINT *pptDst, SIZE *psize, HDC hdcSrc, POINT *pptSrc, COLORREF crKey, BLENDFUNCTION *pblend, DWORD dwFlags) OVERRIDE
Updates the layered window.
BOOL InvalidateRect(LPCRECT lpRect, BOOL bErase=TRUE) OVERRIDE
Invalidates a specified rectangle of the window.
BOOL MoveWindow2(LPCRECT lpRect, BOOL bRepaint=TRUE) OVERRIDE
Moves the window to the specified position and resizes it using a rectangle.
long Release() PURE
Release reference.
void OnFinalRelease() PURE
Final release of the object.
long AddRef() PURE
Add reference.