Added DPI awareness option.
This commit is contained in:
@ -27,6 +27,7 @@ windows
|
||||
does> dup @ swap cell+ @ execute ;
|
||||
: dll ( z "name" -- )
|
||||
LoadLibraryA dup 0= throw create , does> @ sofunc ;
|
||||
: contains? ( z 'lib -- f ) >body @ swap GetProcAddress ;
|
||||
|
||||
z" Kernel32.dll" dll Kernel32
|
||||
|
||||
|
||||
@ -170,4 +170,12 @@ IDI_ASTERISK constant IDI_INFORMATION
|
||||
|
||||
18 constant VK_ALT
|
||||
|
||||
( Check for Windows 10 DPI awareness )
|
||||
z" SetThreadDpiAwarenessContext" ' User32 contains? [IF]
|
||||
z" SetThreadDpiAwarenessContext" 1 User32 SetThreadDpiAwarenessContext
|
||||
: dpi-aware -2 SetThreadDpiAwarenessContext drop ;
|
||||
[ELSE]
|
||||
: dpi-aware ;
|
||||
[THEN]
|
||||
|
||||
only forth definitions
|
||||
|
||||
Reference in New Issue
Block a user