MakeNSISW is now System DPI aware (16x16, 24x24 and 32x32 toolbar images)
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7042 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
b1240c82d9
commit
5642b70dd5
26 changed files with 146 additions and 113 deletions
|
@ -88,12 +88,12 @@ HMENU FindSubMenu(HMENU hMenu, UINT uId);
|
|||
|
||||
typedef enum { CFF_RAWSIZE = 0x00, CFF_DPIPT = 0x01, CFF_DPIFROMHWND = 0x02 } CREATEFONTFLAGS;
|
||||
HFONT CreateFontHelper(INT_PTR Data, int Height, DWORD p1, LPCTSTR Face);
|
||||
inline HFONT CreateFont(INT_PTR Data, UINT16 Flags, int Height, UINT16 Weight, BYTE PitchAndFamily, BYTE CharSet, LPCTSTR Face)
|
||||
inline HFONT CreateFont(INT_PTR Data, WORD Flags, int Height, WORD Weight, BYTE PitchAndFamily, BYTE CharSet, LPCTSTR Face)
|
||||
{
|
||||
DWORD packed = MAKELONG(MAKEWORD(Weight>>2, Flags), MAKEWORD(CharSet, PitchAndFamily));
|
||||
return CreateFontHelper(Data, Height, packed, Face);
|
||||
}
|
||||
inline HFONT CreateFontPt(HWND hWndDPI, int Height, UINT16 Weight, BYTE PitchAndFamily, BYTE CharSet, LPCTSTR Face)
|
||||
inline HFONT CreateFontPt(HWND hWndDPI, int Height, WORD Weight, BYTE PitchAndFamily, BYTE CharSet, LPCTSTR Face)
|
||||
{
|
||||
return CreateFont((INT_PTR) hWndDPI, CFF_DPIFROMHWND|CFF_DPIPT, Height, Weight, PitchAndFamily, CharSet, Face);
|
||||
}
|
||||
|
@ -101,6 +101,7 @@ BOOL DrawHorzGradient(HDC hDC, LONG l, LONG t, LONG r, LONG b, COLORREF c1, COLO
|
|||
inline long RectW(const RECT&r) { return r.right - r.left; }
|
||||
inline long RectH(const RECT&r) { return r.bottom - r.top; }
|
||||
long DlgUnitToPixelX(HWND hDlg, long x);
|
||||
long DlgUnitToPixelY(HWND hDlg, long y);
|
||||
UINT DpiGetForWindow(HWND hWnd);
|
||||
int DpiScaleY(HWND hWnd, int Val);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue