python调用大漠getcursorpos_python - Win32api没有使用python中的GetCursorPos()提供正确的坐标 - 堆栈内存溢出...

您可以这样设置意识等级:

import ctypes

awareness = ctypes.c_int()

ctypes.windll.shcore.SetProcessDpiAwareness(2)

意识等级定义如下:

typedef enum _PROCESS_DPI_AWARENESS {

PROCESS_DPI_UNAWARE = 0,

/* DPI unaware. This app does not scale for DPI changes and is

always assumed to have a scale factor of 100% (96 DPI). It

will be automatically scaled by the system on any other DPI

setting. */

PROCESS_SYSTEM_DPI_AWARE = 1,

/* System DPI aware. This app does not scale for DPI changes.

It will query for the DPI once and use that value for the

lifetime of the app. If the DPI changes, the app will not

adjust to the new DPI value. It will be automatically scaled

up or down by the system when the DPI changes from the system

value. */

PROCESS_PER_MONITOR_DPI_AWARE = 2

/* Per monitor DPI aware. This app checks for the DPI when it is

created and adjusts the scale factor whenever the DPI changes.

These applications are not automatically scaled by the system. */

} PROCESS_DPI_AWARENESS;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值