Skip to content

Instantly share code, notes, and snippets.

@RikkaW
Last active November 21, 2015 10:12
Show Gist options
  • Save RikkaW/a4b08a4e0b22e06a27d9 to your computer and use it in GitHub Desktop.
Save RikkaW/a4b08a4e0b22e06a27d9 to your computer and use it in GitHub Desktop.
// 新的 windows 10 似乎已经修了问题 不需要这个了
// 而且下面这玩意在 windows 8.1 之前用会爆炸
typedef enum PROCESS_DPI_AWARENESS {
PROCESS_DPI_UNAWARE = 0,
PROCESS_SYSTEM_DPI_AWARE = 1,
PROCESS_PER_MONITOR_DPI_AWARE = 2
} PROCESS_DPI_AWARENESS;
STDAPI SetProcessDpiAwareness(
_In_ PROCESS_DPI_AWARENESS value);
// 需要 shcore.lib
// 这句放 metahook 插件的 Init 里面
SetProcessDpiAwareness(PROCESS_PER_MONITOR_DPI_AWARE);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment