Class for managing native window operations. More...
#include <SNativeWnd.h>
Public Member Functions | |
int | GetID () SCONST |
Retrieves the window ID. | |
void | SetID (int nID) |
Sets the window ID. | |
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. | |
HWND | GetHwnd () OVERRIDE |
Retrieves the handle to the window. | |
BOOL | SubclassWindow (HWND hWnd) OVERRIDE |
Subclasses an existing window. | |
HWND | UnsubclassWindow (BOOL bForce=FALSE) OVERRIDE |
Unsubclasses a window. | |
const MSG * | GetCurrentMessage () SCONST OVERRIDE |
Retrieves the current message being processed. | |
int | GetDlgCtrlID () SCONST OVERRIDE |
Retrieves the dialog control ID. | |
DWORD | GetStyle () SCONST OVERRIDE |
Retrieves the window style. | |
DWORD | GetExStyle () SCONST OVERRIDE |
Retrieves the extended window style. | |
LONG_PTR | GetWindowLongPtr (int nIndex) SCONST OVERRIDE |
Retrieves the long pointer value at the specified index. | |
LONG_PTR | SetWindowLongPtr (int nIndex, LONG_PTR dwNewLong) OVERRIDE |
Sets the long pointer value at the specified index. | |
HWND | GetParent () OVERRIDE |
Retrieves the handle to the parent window. | |
HWND | SetParent (HWND hWndNewParent) OVERRIDE |
Sets the handle to the parent window. | |
BOOL | IsWindowEnabled () SCONST OVERRIDE |
Checks if the window is enabled. | |
BOOL | ModifyStyle (DWORD dwRemove, DWORD dwAdd, UINT nFlags=0) OVERRIDE |
Modifies the window style. | |
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. | |
BOOL | CenterWindow (HWND hWndCenter=0) OVERRIDE |
Centers the window relative to another window. | |
BOOL | DestroyWindow () OVERRIDE |
Destroys the window. | |
BOOL | IsWindow () SCONST OVERRIDE |
Checks if the handle is a valid window handle. | |
BOOL | Invalidate (BOOL bErase=TRUE) OVERRIDE |
Invalidates the entire window. | |
BOOL | InvalidateRect (LPCRECT lpRect, BOOL bErase=TRUE) OVERRIDE |
Invalidates a specified rectangle of the window. | |
BOOL | GetWindowRect (LPRECT lpRect) SCONST OVERRIDE |
Retrieves the window rectangle. | |
BOOL | GetClientRect (LPRECT lpRect) SCONST OVERRIDE |
Retrieves the client rectangle. | |
BOOL | ClientToScreen (LPPOINT lpPoint) SCONST OVERRIDE |
Converts client coordinates to screen coordinates. | |
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. | |
BOOL | ScreenToClient2 (LPRECT lpRect) SCONST OVERRIDE |
Converts screen rectangle coordinates to client coordinates. | |
int | MapWindowPoints (HWND hWndTo, LPPOINT lpPoint, UINT nCount) SCONST OVERRIDE |
Maps points from one window to another. | |
int | MapWindowRect (HWND hWndTo, LPRECT lpRect) SCONST OVERRIDE |
Maps a rectangle from one window to another. | |
UINT_PTR | SetTimer (UINT_PTR nIDEvent, UINT nElapse, void(CALLBACK *lpfnTimer)(HWND, UINT, UINT_PTR, DWORD)=NULL) OVERRIDE |
Sets a timer for the window. | |
BOOL | KillTimer (UINT_PTR nIDEvent) OVERRIDE |
Kills a timer for the window. | |
HDC | GetDC () OVERRIDE |
Retrieves a device context for the window. | |
HDC | GetWindowDC () OVERRIDE |
Retrieves a device context for the entire window. | |
int | ReleaseDC (HDC hDC) OVERRIDE |
Releases a device context. | |
BOOL | CreateCaret (HBITMAP hBitmap, int nWidth, int nHeight) OVERRIDE |
Creates a caret for the window. | |
BOOL | HideCaret () OVERRIDE |
Hides the caret. | |
BOOL | ShowCaret () OVERRIDE |
Shows the caret. | |
HWND | GetCapture () OVERRIDE |
Retrieves the handle to the window that has captured the mouse. | |
HWND | SetCapture () OVERRIDE |
Sets the window to capture the mouse. | |
BOOL | ReleaseCapture () OVERRIDE |
Releases the mouse capture. | |
HWND | SetFocus () OVERRIDE |
Sets the input focus to the window. | |
LRESULT | SendMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0) OVERRIDE |
Sends a message to the window. | |
BOOL | PostMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0) OVERRIDE |
Posts a message to the window. | |
BOOL | SendNotifyMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0) OVERRIDE |
Sends a notify message to the window. | |
BOOL | SetWindowText (LPCTSTR lpszString) OVERRIDE |
Sets the window text. | |
int | GetWindowText (LPTSTR lpszStringBuf, int nMaxCount) SCONST OVERRIDE |
Retrieves the window text. | |
BOOL | IsIconic () SCONST OVERRIDE |
Checks if the window is iconic (minimized). | |
BOOL | IsZoomed () SCONST OVERRIDE |
Checks if the window is zoomed (maximized). | |
BOOL | IsWindowVisible () SCONST OVERRIDE |
Checks if the window is visible. | |
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 | MoveWindow2 (LPCRECT lpRect, BOOL bRepaint=TRUE) OVERRIDE |
Moves the window to the specified position and resizes it using a rectangle. | |
BOOL | ShowWindow (int nCmdShow) OVERRIDE |
Sets the show state of the window. | |
int | SetWindowRgn (HRGN hRgn, BOOL bRedraw=TRUE) OVERRIDE |
Sets the window region. | |
BOOL | SetLayeredWindowAttributes (COLORREF crKey, BYTE bAlpha, DWORD dwFlags) OVERRIDE |
Sets the layered window attributes. | |
BOOL | UpdateLayeredWindow (HDC hdcDst, POINT *pptDst, SIZE *psize, HDC hdcSrc, POINT *pptSrc, COLORREF crKey, BLENDFUNCTION *pblend, DWORD dwFlags) OVERRIDE |
Updates the layered window. | |
void | SetMsgHandler (FunMsgHandler fun, void *ctx) OVERRIDE |
Sets the message handler for the window. | |
MsgHandlerInfo * | GetMsgHandler () OVERRIDE |
Retrieves the message handler for the window. | |
LRESULT | DefWindowProc () |
Calls the default window procedure. | |
LRESULT | ForwardNotifications (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) |
Forwards notifications to the appropriate handler. | |
LRESULT | ReflectNotifications (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) |
Reflects notifications to the appropriate handler. | |
virtual BOOL | ProcessWindowMessage (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult, DWORD dwMsgMapID=0) |
Processes a window message. | |
![]() | |
TObjRefImpl () | |
Constructor that initializes the reference count to 1. | |
virtual | ~TObjRefImpl () |
Virtual destructor. | |
long | AddRef () override |
Increments the reference count. | |
long | Release () override |
Decrements the reference count and deletes the object if the count reaches zero. | |
void | OnFinalRelease () override |
Deletes the object. | |
![]() | |
long | AddRef () PURE |
Increases the reference count. | |
long | Release () PURE |
Decreases the reference count. | |
void | OnFinalRelease () PURE |
Called when the reference count reaches zero and the object is about to be released. | |
Static Public Member Functions | |
static ATOM | RegisterSimpleWnd (HINSTANCE hInst, LPCTSTR pszSimpleWndName, BOOL bImeWnd) |
Registers a simple window class. | |
static void | InitWndClass (HINSTANCE hInst, LPCTSTR pszSimpleWndName, BOOL bImeWnd) |
Initializes the window class. | |
static BOOL | DefaultReflectionHandler (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult) |
Default reflection handler for notifications. | |
Public Attributes | |
HWND | m_hWnd |
Handle to the window. | |
Protected Member Functions | |
LRESULT | DefWindowProc (UINT uMsg, WPARAM wParam, LPARAM lParam) |
Calls the default window procedure with specific parameters. | |
virtual void | OnFinalMessage (HWND hWnd) |
Handles the final message for the window. | |
Static Protected Member Functions | |
static LRESULT CALLBACK | WindowProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) |
Window procedure callback function. | |
static LRESULT CALLBACK | StartWindowProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) |
Start window procedure callback function (executed once). | |
Protected Attributes | |
const MSG * | m_pCurrentMsg |
Pointer to the current message. | |
BOOL | m_bDestoryed |
Flag indicating if the window is destroyed. | |
MsgHandlerInfo | m_msgHandlerInfo |
Message handler information. | |
tagThunk * | m_pThunk |
Thunk structure. | |
WNDPROC | m_pfnSuperWindowProc |
Pointer to the superclass window procedure. | |
![]() | |
LONG | m_cRef |
Reference count. | |
Class for managing native window operations.
This class provides methods for creating, subclassing, and managing native Windows, as well as handling window messages and notifications.
Definition at line 126 of file SNativeWnd.h.
SNativeWnd::SNativeWnd | ( | ) |
Definition at line 187 of file SNativeWnd.cpp.
|
virtual |
Definition at line 198 of file SNativeWnd.cpp.
BOOL SNativeWnd::CenterWindow | ( | HWND | hWndCenter = 0 | ) |
Centers the window relative to another window.
hWndCenter | Handle to the window to center relative to. |
Implements INativeWnd.
Definition at line 527 of file SNativeWnd.cpp.
BOOL SNativeWnd::ClientToScreen | ( | LPPOINT | lpPoint | ) |
Converts client coordinates to screen coordinates.
lpPoint | Point to convert. |
Implements INativeWnd.
Definition at line 857 of file SNativeWnd.cpp.
BOOL SNativeWnd::ClientToScreen2 | ( | LPRECT | lpRect | ) |
Converts client rectangle coordinates to screen coordinates.
lpRect | Rectangle to convert. |
Implements INativeWnd.
Definition at line 849 of file SNativeWnd.cpp.
BOOL SNativeWnd::CreateCaret | ( | HBITMAP | hBitmap, |
int | nWidth, | ||
int | nHeight ) |
Creates a caret for the window.
hBitmap | Handle to the bitmap for the caret. |
nWidth | Width of the caret. |
nHeight | Height of the caret. |
Implements INativeWnd.
Definition at line 787 of file SNativeWnd.cpp.
HWND SNativeWnd::CreateNative | ( | LPCTSTR | lpWindowName, |
DWORD | dwStyle, | ||
DWORD | dwExStyle, | ||
int | x, | ||
int | y, | ||
int | nWidth, | ||
int | nHeight, | ||
HWND | hWndParent, | ||
int | nID = 0, | ||
LPVOID | lpParam = 0 ) |
Creates a native window.
lpWindowName | Name of the window. |
dwStyle | Window style. |
dwExStyle | Extended window style. |
x | X position of the window. |
y | Y position of the window. |
nWidth | Width of the window. |
nHeight | Height of the window. |
hWndParent | Handle to the parent window. |
nID | Control ID of the window. |
lpParam | Pointer to creation parameters. |
Implements INativeWnd.
Definition at line 219 of file SNativeWnd.cpp.
|
static |
Default reflection handler for notifications.
hWnd | Handle to the window. |
uMsg | Message identifier. |
wParam | WPARAM for the message. |
lParam | LPARAM for the message. |
lResult | Result of the message processing. |
Definition at line 481 of file SNativeWnd.cpp.
LRESULT SNativeWnd::DefWindowProc | ( | ) |
Calls the default window procedure.
Definition at line 518 of file SNativeWnd.cpp.
|
protected |
Calls the default window procedure with specific parameters.
uMsg | Message identifier. |
wParam | WPARAM for the message. |
lParam | LPARAM for the message. |
Definition at line 513 of file SNativeWnd.cpp.
BOOL SNativeWnd::DestroyWindow | ( | ) |
Destroys the window.
Implements INativeWnd.
Definition at line 892 of file SNativeWnd.cpp.
LRESULT SNativeWnd::ForwardNotifications | ( | UINT | uMsg, |
WPARAM | wParam, | ||
LPARAM | lParam, | ||
BOOL & | bHandled ) |
Forwards notifications to the appropriate handler.
uMsg | Message identifier. |
wParam | WPARAM for the message. |
lParam | LPARAM for the message. |
bHandled | Flag indicating if the message was handled. |
Definition at line 382 of file SNativeWnd.cpp.
HWND SNativeWnd::GetCapture | ( | ) |
Retrieves the handle to the window that has captured the mouse.
Implements INativeWnd.
Definition at line 765 of file SNativeWnd.cpp.
BOOL SNativeWnd::GetClientRect | ( | LPRECT | lpRect | ) |
Retrieves the client rectangle.
lpRect | Rectangle to receive the client rectangle. |
Implements INativeWnd.
Definition at line 863 of file SNativeWnd.cpp.
const MSG * SNativeWnd::GetCurrentMessage | ( | ) |
Retrieves the current message being processed.
Implements INativeWnd.
Definition at line 952 of file SNativeWnd.cpp.
HDC SNativeWnd::GetDC | ( | ) |
Retrieves a device context for the window.
Implements INativeWnd.
Definition at line 805 of file SNativeWnd.cpp.
int SNativeWnd::GetDlgCtrlID | ( | ) |
Retrieves the dialog control ID.
Implements INativeWnd.
Definition at line 946 of file SNativeWnd.cpp.
DWORD SNativeWnd::GetExStyle | ( | ) |
Retrieves the extended window style.
Implements INativeWnd.
Definition at line 934 of file SNativeWnd.cpp.
HWND SNativeWnd::GetHwnd | ( | ) |
Retrieves the handle to the window.
Implements INativeWnd.
Definition at line 237 of file SNativeWnd.cpp.
|
inline |
MsgHandlerInfo * SNativeWnd::GetMsgHandler | ( | ) |
Retrieves the message handler for the window.
Implements INativeWnd.
Definition at line 963 of file SNativeWnd.cpp.
HWND SNativeWnd::GetParent | ( | ) |
Retrieves the handle to the parent window.
Implements INativeWnd.
Definition at line 916 of file SNativeWnd.cpp.
DWORD SNativeWnd::GetStyle | ( | ) |
Retrieves the window style.
Implements INativeWnd.
Definition at line 940 of file SNativeWnd.cpp.
HDC SNativeWnd::GetWindowDC | ( | ) |
Retrieves a device context for the entire window.
Implements INativeWnd.
Definition at line 799 of file SNativeWnd.cpp.
LONG_PTR SNativeWnd::GetWindowLongPtr | ( | int | nIndex | ) |
Retrieves the long pointer value at the specified index.
nIndex | Index of the value to retrieve. |
Implements INativeWnd.
Definition at line 928 of file SNativeWnd.cpp.
BOOL SNativeWnd::GetWindowRect | ( | LPRECT | lpRect | ) |
Retrieves the window rectangle.
lpRect | Rectangle to receive the window rectangle. |
Implements INativeWnd.
Definition at line 869 of file SNativeWnd.cpp.
int SNativeWnd::GetWindowText | ( | LPTSTR | lpszStringBuf, |
int | nMaxCount ) |
Retrieves the window text.
lpszStringBuf | Buffer to receive the window text. |
nMaxCount | Maximum number of characters to copy to the buffer. |
Implements INativeWnd.
Definition at line 723 of file SNativeWnd.cpp.
BOOL SNativeWnd::HideCaret | ( | ) |
Hides the caret.
Implements INativeWnd.
Definition at line 781 of file SNativeWnd.cpp.
|
static |
Initializes the window class.
hInst | Handle to the application instance. |
pszSimpleWndName | Name of the simple window class. |
bImeWnd | Flag indicating if the window uses IME. |
Definition at line 214 of file SNativeWnd.cpp.
BOOL SNativeWnd::Invalidate | ( | BOOL | bErase = TRUE | ) |
Invalidates the entire window.
bErase | Flag indicating if the background should be erased. |
Implements INativeWnd.
Definition at line 881 of file SNativeWnd.cpp.
BOOL SNativeWnd::InvalidateRect | ( | LPCRECT | lpRect, |
BOOL | bErase = TRUE ) |
Invalidates a specified rectangle of the window.
lpRect | Rectangle to invalidate. |
bErase | Flag indicating if the background should be erased. |
Implements INativeWnd.
Definition at line 875 of file SNativeWnd.cpp.
BOOL SNativeWnd::IsIconic | ( | ) |
Checks if the window is iconic (minimized).
Implements INativeWnd.
Definition at line 717 of file SNativeWnd.cpp.
BOOL SNativeWnd::IsWindow | ( | ) |
Checks if the handle is a valid window handle.
Implements INativeWnd.
Definition at line 887 of file SNativeWnd.cpp.
BOOL SNativeWnd::IsWindowEnabled | ( | ) |
Checks if the window is enabled.
Implements INativeWnd.
Definition at line 904 of file SNativeWnd.cpp.
BOOL SNativeWnd::IsWindowVisible | ( | ) |
Checks if the window is visible.
Implements INativeWnd.
Definition at line 705 of file SNativeWnd.cpp.
BOOL SNativeWnd::IsZoomed | ( | ) |
Checks if the window is zoomed (maximized).
Implements INativeWnd.
Definition at line 711 of file SNativeWnd.cpp.
BOOL SNativeWnd::KillTimer | ( | UINT_PTR | nIDEvent | ) |
Kills a timer for the window.
nIDEvent | Timer ID. |
Implements INativeWnd.
Definition at line 811 of file SNativeWnd.cpp.
int SNativeWnd::MapWindowPoints | ( | HWND | hWndTo, |
LPPOINT | lpPoint, | ||
UINT | nCount ) |
Maps points from one window to another.
hWndTo | Handle to the destination window. |
lpPoint | Points to map. |
nCount | Number of points. |
Implements INativeWnd.
Definition at line 829 of file SNativeWnd.cpp.
int SNativeWnd::MapWindowRect | ( | HWND | hWndTo, |
LPRECT | lpRect ) |
Maps a rectangle from one window to another.
hWndTo | Handle to the destination window. |
lpRect | Rectangle to map. |
Implements INativeWnd.
Definition at line 823 of file SNativeWnd.cpp.
BOOL SNativeWnd::ModifyStyle | ( | DWORD | dwRemove, |
DWORD | dwAdd, | ||
UINT | nFlags = 0 ) |
Modifies the window style.
dwRemove | Styles to remove. |
dwAdd | Styles to add. |
nFlags | Flags for modification. |
Implements INativeWnd.
Definition at line 623 of file SNativeWnd.cpp.
BOOL SNativeWnd::ModifyStyleEx | ( | DWORD | dwRemove, |
DWORD | dwAdd, | ||
UINT | nFlags = 0 ) |
Modifies the extended window style.
dwRemove | Styles to remove. |
dwAdd | Styles to add. |
nFlags | Flags for modification. |
Implements INativeWnd.
Definition at line 641 of file SNativeWnd.cpp.
BOOL SNativeWnd::MoveWindow | ( | int | x, |
int | y, | ||
int | nWidth, | ||
int | nHeight, | ||
BOOL | bRepaint = TRUE ) |
Moves the window to the specified position and resizes it.
x | X position of the window. |
y | Y position of the window. |
nWidth | Width of the window. |
nHeight | Height of the window. |
bRepaint | Flag indicating if the window should be repainted. |
Implements INativeWnd.
Definition at line 699 of file SNativeWnd.cpp.
BOOL SNativeWnd::MoveWindow2 | ( | LPCRECT | lpRect, |
BOOL | bRepaint = TRUE ) |
Moves the window to the specified position and resizes it using a rectangle.
lpRect | Rectangle defining the new position and size of the window. |
bRepaint | Flag indicating if the window should be repainted. |
Implements INativeWnd.
Definition at line 693 of file SNativeWnd.cpp.
|
protectedvirtual |
Handles the final message for the window.
hWnd | Handle to the window. |
Reimplemented in SDropDownWnd, and STipCtrl.
Definition at line 242 of file SNativeWnd.cpp.
BOOL SNativeWnd::PostMessage | ( | UINT | message, |
WPARAM | wParam = 0, | ||
LPARAM | lParam = 0 ) |
Posts a message to the window.
message | Message to post. |
wParam | WPARAM for the message. |
lParam | LPARAM for the message. |
Implements INativeWnd.
Definition at line 741 of file SNativeWnd.cpp.
|
virtual |
Processes a window message.
hWnd | Handle to the window. |
uMsg | Message identifier. |
wParam | WPARAM for the message. |
lParam | LPARAM for the message. |
lResult | Result of the message processing. |
dwMsgMapID | Message map ID. |
Reimplemented in SMessageBoxImpl.
Definition at line 660 of file SNativeWnd.cpp.
LRESULT SNativeWnd::ReflectNotifications | ( | UINT | uMsg, |
WPARAM | wParam, | ||
LPARAM | lParam, | ||
BOOL & | bHandled ) |
Reflects notifications to the appropriate handler.
uMsg | Message identifier. |
wParam | WPARAM for the message. |
lParam | LPARAM for the message. |
bHandled | Flag indicating if the message was handled. |
Definition at line 408 of file SNativeWnd.cpp.
|
static |
Registers a simple window class.
hInst | Handle to the application instance. |
pszSimpleWndName | Name of the simple window class. |
bImeWnd | Flag indicating if the window uses IME. |
Definition at line 202 of file SNativeWnd.cpp.
BOOL SNativeWnd::ReleaseCapture | ( | ) |
Releases the mouse capture.
Implements INativeWnd.
Definition at line 770 of file SNativeWnd.cpp.
int SNativeWnd::ReleaseDC | ( | HDC | hDC | ) |
Releases a device context.
hDC | Handle to the device context to release. |
Implements INativeWnd.
Definition at line 793 of file SNativeWnd.cpp.
BOOL SNativeWnd::ScreenToClient | ( | LPPOINT | lpPoint | ) |
Converts screen coordinates to client coordinates.
lpPoint | Point to convert. |
Implements INativeWnd.
Definition at line 843 of file SNativeWnd.cpp.
BOOL SNativeWnd::ScreenToClient2 | ( | LPRECT | lpRect | ) |
Converts screen rectangle coordinates to client coordinates.
lpRect | Rectangle to convert. |
Implements INativeWnd.
Definition at line 835 of file SNativeWnd.cpp.
LRESULT SNativeWnd::SendMessage | ( | UINT | message, |
WPARAM | wParam = 0, | ||
LPARAM | lParam = 0 ) |
Sends a message to the window.
message | Message to send. |
wParam | WPARAM for the message. |
lParam | LPARAM for the message. |
Implements INativeWnd.
Definition at line 747 of file SNativeWnd.cpp.
BOOL SNativeWnd::SendNotifyMessage | ( | UINT | message, |
WPARAM | wParam = 0, | ||
LPARAM | lParam = 0 ) |
Sends a notify message to the window.
message | Message to send. |
wParam | WPARAM for the message. |
lParam | LPARAM for the message. |
Implements INativeWnd.
Definition at line 735 of file SNativeWnd.cpp.
HWND SNativeWnd::SetCapture | ( | ) |
Sets the window to capture the mouse.
Implements INativeWnd.
Definition at line 759 of file SNativeWnd.cpp.
HWND SNativeWnd::SetFocus | ( | ) |
Sets the input focus to the window.
Implements INativeWnd.
Definition at line 753 of file SNativeWnd.cpp.
|
inline |
BOOL SNativeWnd::SetLayeredWindowAttributes | ( | COLORREF | crKey, |
BYTE | bAlpha, | ||
DWORD | dwFlags ) |
Sets the layered window attributes.
crKey | Color key for transparency. |
bAlpha | Alpha value for transparency. |
dwFlags | Flags for the layered window attributes. |
Implements INativeWnd.
Definition at line 675 of file SNativeWnd.cpp.
void SNativeWnd::SetMsgHandler | ( | FunMsgHandler | fun, |
void * | ctx ) |
Sets the message handler for the window.
fun | Function pointer to the message handler. |
ctx | Context pointer for the message handler. |
Implements INativeWnd.
Definition at line 957 of file SNativeWnd.cpp.
HWND SNativeWnd::SetParent | ( | HWND | hWndNewParent | ) |
Sets the handle to the parent window.
hWndNewParent | Handle to the new parent window. |
Implements INativeWnd.
Definition at line 910 of file SNativeWnd.cpp.
UINT_PTR SNativeWnd::SetTimer | ( | UINT_PTR | nIDEvent, |
UINT | nElapse, | ||
void(CALLBACK *lpfnTimer)(HWND, UINT, UINT_PTR, DWORD) | = NULL ) |
Sets a timer for the window.
nIDEvent | Timer ID. |
nElapse | Elapse time in milliseconds. |
lpfnTimer | Timer callback function. |
Implements INativeWnd.
Definition at line 817 of file SNativeWnd.cpp.
LONG_PTR SNativeWnd::SetWindowLongPtr | ( | int | nIndex, |
LONG_PTR | dwNewLong ) |
Sets the long pointer value at the specified index.
nIndex | Index of the value to set. |
dwNewLong | New long pointer value. |
Implements INativeWnd.
Definition at line 922 of file SNativeWnd.cpp.
BOOL SNativeWnd::SetWindowPos | ( | HWND | hWndInsertAfter, |
int | x, | ||
int | y, | ||
int | cx, | ||
int | cy, | ||
UINT | nFlags ) |
Sets the window position.
hWndInsertAfter | Handle to the window to insert after. |
x | X position of the window. |
y | Y position of the window. |
cx | Width of the window. |
cy | Height of the window. |
nFlags | Flags for positioning. |
Implements INativeWnd.
Definition at line 898 of file SNativeWnd.cpp.
int SNativeWnd::SetWindowRgn | ( | HRGN | hRgn, |
BOOL | bRedraw = TRUE ) |
Sets the window region.
hRgn | Handle to the region. |
bRedraw | Flag indicating if the window should be redrawn. |
Implements INativeWnd.
Definition at line 681 of file SNativeWnd.cpp.
BOOL SNativeWnd::SetWindowText | ( | LPCTSTR | lpszString | ) |
Sets the window text.
lpszString | String to set as the window text. |
Implements INativeWnd.
Definition at line 729 of file SNativeWnd.cpp.
BOOL SNativeWnd::ShowCaret | ( | ) |
Shows the caret.
Implements INativeWnd.
Definition at line 775 of file SNativeWnd.cpp.
BOOL SNativeWnd::ShowWindow | ( | int | nCmdShow | ) |
Sets the show state of the window.
nCmdShow | Command to show the window (e.g., SW_SHOW, SW_HIDE). |
Implements INativeWnd.
Definition at line 687 of file SNativeWnd.cpp.
|
staticprotected |
Start window procedure callback function (executed once).
hWnd | Handle to the window. |
uMsg | Message identifier. |
wParam | WPARAM for the message. |
lParam | LPARAM for the message. |
Definition at line 310 of file SNativeWnd.cpp.
BOOL SNativeWnd::SubclassWindow | ( | HWND | hWnd | ) |
Subclasses an existing window.
hWnd | Handle to the window to subclass. |
Implements INativeWnd.
Definition at line 330 of file SNativeWnd.cpp.
HWND SNativeWnd::UnsubclassWindow | ( | BOOL | bForce = FALSE | ) |
Unsubclasses a window.
bForce | Flag indicating if the unsubclassing should be forced. |
Implements INativeWnd.
Definition at line 356 of file SNativeWnd.cpp.
BOOL SNativeWnd::UpdateLayeredWindow | ( | HDC | hdcDst, |
POINT * | pptDst, | ||
SIZE * | psize, | ||
HDC | hdcSrc, | ||
POINT * | pptSrc, | ||
COLORREF | crKey, | ||
BLENDFUNCTION * | pblend, | ||
DWORD | dwFlags ) |
Updates the layered window.
hdcDst | Destination device context. |
pptDst | Destination point. |
psize | Size of the destination. |
hdcSrc | Source device context. |
pptSrc | Source point. |
crKey | Color key for transparency. |
pblend | Blend function. |
dwFlags | Flags for the update. |
Implements INativeWnd.
Definition at line 665 of file SNativeWnd.cpp.
|
staticprotected |
Window procedure callback function.
hWnd | Handle to the window. |
uMsg | Message identifier. |
wParam | WPARAM for the message. |
lParam | LPARAM for the message. |
Definition at line 254 of file SNativeWnd.cpp.
|
protected |
Flag indicating if the window is destroyed.
Definition at line 740 of file SNativeWnd.h.
HWND SNativeWnd::m_hWnd |
Handle to the window.
Definition at line 744 of file SNativeWnd.h.
|
protected |
Message handler information.
Definition at line 741 of file SNativeWnd.h.
|
protected |
Pointer to the current message.
Definition at line 739 of file SNativeWnd.h.
|
protected |
Pointer to the superclass window procedure.
Definition at line 769 of file SNativeWnd.h.
|
protected |
Thunk structure.
Definition at line 768 of file SNativeWnd.h.