SavvyUI C++ UI Library
Loading...
Searching...
No Matches
UICommon.h
Go to the documentation of this file.
1#pragma once
2
3#include "Common.h"
4#include "Theme.h"
5#include "Models.h"
6
7#define STANDARD_FONT_NAME L"Arial"
8#define STANDARD_FONT_SIZE 12
9
15{
16 static UINT NextId;
17
18public:
24 static void getScreenSize(long& width, long& height);
25
30 static void setWindowVisible(WinHandle hWnd);
31
36 static void setWindowHidden(WinHandle hWnd);
37
41 static void redrawWindow(WinHandle hWnd);
42
51 static BOOL processCommonWndProcSubclassingFunctionality(WinHandle hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
52
53public:
64 static HFONT CreateCustomFont(DCHandle hDC, const wstring& fontName, int fontSize, BOOL isBold = FALSE, BOOL isItalic = FALSE, BOOL isUnderlined = FALSE);
65};
HWND WinHandle
Definition Common.h:16
HDC DCHandle
Definition Common.h:17
Utility class providing common UI helper functions for font management, drawing, and window visibilit...
Definition UICommon.h:15
static void setWindowVisible(WinHandle hWnd)
Makes a window visible.
static void getScreenSize(long &width, long &height)
Retrieves the screen size in pixels.
static HFONT CreateCustomFont(DCHandle hDC, const wstring &fontName, int fontSize, BOOL isBold=FALSE, BOOL isItalic=FALSE, BOOL isUnderlined=FALSE)
Creates a custom font.
static void redrawWindow(WinHandle hWnd)
The following functions manage windows updates throttling.
static void setWindowHidden(WinHandle hWnd)
Hides a window.
static BOOL processCommonWndProcSubclassingFunctionality(WinHandle hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
Processes common window procedure subclassing functionality.