SavvyUI C++ UI Library
Loading...
Searching...
No Matches
UICommonUtils Class Reference

Utility class providing common UI helper functions for font management, drawing, and window visibility. More...

#include <UICommon.h>

Static Public Member Functions

static void getScreenSize (long &width, long &height)
 Retrieves the screen size in pixels.
static void setWindowVisible (WinHandle hWnd)
 Makes a window visible.
static void setWindowHidden (WinHandle hWnd)
 Hides a window.
static void redrawWindow (WinHandle hWnd)
 The following functions manage windows updates throttling.
static BOOL processCommonWndProcSubclassingFunctionality (WinHandle hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
 Processes common window procedure subclassing functionality.
static HFONT CreateCustomFont (DCHandle hDC, const wstring &fontName, int fontSize, BOOL isBold=FALSE, BOOL isItalic=FALSE, BOOL isUnderlined=FALSE)
 Creates a custom font.

Detailed Description

Utility class providing common UI helper functions for font management, drawing, and window visibility.

Member Function Documentation

◆ CreateCustomFont()

HFONT UICommonUtils::CreateCustomFont ( DCHandle hDC,
const wstring & fontName,
int fontSize,
BOOL isBold = FALSE,
BOOL isItalic = FALSE,
BOOL isUnderlined = FALSE )
static

Creates a custom font.

Parameters
hDCDevice context handle.
fontNameName of the font (e.g., L"Arial").
fontSizeSize of the font in points.
isBoldWhether the font should be bold.
isItalicWhether the font should be italic.
isUnderlinedWhether the font should be underlined.
Returns
Handle to the created font (HFONT).

◆ getScreenSize()

void UICommonUtils::getScreenSize ( long & width,
long & height )
static

Retrieves the screen size in pixels.

Parameters
widthReference to variable to receive screen width.
heightReference to variable to receive screen height.

◆ processCommonWndProcSubclassingFunctionality()

BOOL UICommonUtils::processCommonWndProcSubclassingFunctionality ( WinHandle hWnd,
UINT msg,
WPARAM wParam,
LPARAM lParam )
static

Processes common window procedure subclassing functionality.

Parameters
hWndHandle to the window.
msgWindows message code.
wParamAdditional message information.
lParamAdditional message information.
Returns
TRUE if the message was processed; FALSE otherwise.

◆ redrawWindow()

void UICommonUtils::redrawWindow ( WinHandle hWnd)
static

The following functions manage windows updates throttling.

◆ setWindowHidden()

void UICommonUtils::setWindowHidden ( WinHandle hWnd)
static

Hides a window.

Parameters
hWndHandle to the window.

◆ setWindowVisible()

void UICommonUtils::setWindowVisible ( WinHandle hWnd)
static

Makes a window visible.

Parameters
hWndHandle to the window.

The documentation for this class was generated from the following file: