Utility class providing common UI helper functions for font management, drawing, and window visibility.
More...
#include <UICommon.h>
|
| 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.
|
| static BOOL | calculateMaxVisibleItems (__int64 availableHeight, __int64 itemHeight, __int64 totalItemCount, __int64 firstVisibleItem, __int64 &lastVisibleItem, long &maxVisibleItems, BOOL &lastItemIsPartiallyDisplayed, BOOL &isVScrollbarVisible) |
Utility class providing common UI helper functions for font management, drawing, and window visibility.
◆ calculateMaxVisibleItems()
| BOOL UICommonUtils::calculateMaxVisibleItems |
( |
__int64 | availableHeight, |
|
|
__int64 | itemHeight, |
|
|
__int64 | totalItemCount, |
|
|
__int64 | firstVisibleItem, |
|
|
__int64 & | lastVisibleItem, |
|
|
long & | maxVisibleItems, |
|
|
BOOL & | lastItemIsPartiallyDisplayed, |
|
|
BOOL & | isVScrollbarVisible ) |
|
static |
◆ 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
-
| hDC | Device context handle. |
| fontName | Name of the font (e.g., L"Arial"). |
| fontSize | Size of the font in points. |
| isBold | Whether the font should be bold. |
| isItalic | Whether the font should be italic. |
| isUnderlined | Whether 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
-
| width | Reference to variable to receive screen width. |
| height | Reference 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
-
| hWnd | Handle to the window. |
| msg | Windows message code. |
| wParam | Additional message information. |
| lParam | Additional 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
-
| hWnd | Handle to the window. |
◆ setWindowVisible()
| void UICommonUtils::setWindowVisible |
( |
WinHandle | hWnd | ) |
|
|
static |
Makes a window visible.
- Parameters
-
| hWnd | Handle to the window. |
The documentation for this class was generated from the following file: