1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
#pragma once
#include <windows.h>
#include <rpc.h>
#ifndef WM_DPICHANGED
#define WM_DPICHANGED 0x02E0
#endif
typedef LRESULT (CALLBACK *ALF_COMPAT_SUBCLASSPROC)(HWND,UINT,WPARAM,LPARAM,UINT_PTR,DWORD_PTR);
typedef struct {
UINT cbSize;
int iBorderWidth;
int iScrollWidth;
int iScrollHeight;
int iCaptionWidth;
int iCaptionHeight;
LOGFONT lfCaptionFont;
int iSmCaptionWidth;
int iSmCaptionHeight;
LOGFONT lfSmCaptionFont;
int iMenuWidth;
int iMenuHeight;
LOGFONT lfMenuFont;
LOGFONT lfStatusFont;
LOGFONT lfMessageFont;
int iPaddedBorderWidth; // new in Vista
} ALF_NONCLIENTMETRICS_VISTA;
static inline SIZE_T
ALF_SizeOf_NONCLIENTMETRICS(void)
{
if (LOBYTE(LOWORD(GetVersion())) >= 6) {
return sizeof(ALF_NONCLIENTMETRICS_VISTA);
} else {
return sizeof(ALF_NONCLIENTMETRICS_VISTA) - sizeof(int);
}
}
long
ALF_GetAveCharWidth(HDC hdc);
void
ALF_UniqueCounterValue(LONG_PTR *pCounterId, LONG_PTR *pCounterValue);
extern BOOL (WINAPI *ALF_Compat_IsAppThemed)(void);
extern UINT (WINAPI *ALF_Compat_GetDpiForWindow)(HWND);
extern BOOL (WINAPI *ALF_Compat_AdjustWindowRectExForDpi)(LPRECT,DWORD,BOOL,DWORD,UINT);
extern int (WINAPI *ALF_Compat_GetSystemMetricsForDpi)(int, UINT);
extern BOOL (WINAPI *ALF_Compat_SetWindowSubclass)(HWND, ALF_COMPAT_SUBCLASSPROC, UINT_PTR, DWORD_PTR);
extern LRESULT (WINAPI *ALF_Compat_DefSubclassProc)(HWND, UINT, WPARAM, LPARAM);
extern BOOL (WINAPI *ALF_Compat_RemoveWindowSubclass)(HWND, ALF_COMPAT_SUBCLASSPROC, UINT_PTR);
extern BOOL (WINAPI *ALF_Compat_SystemParametersInfoForDpi)(UINT,UINT,PVOID,UINT,UINT);
|