deleted HDPI support in front of CreateWindowEx, use mainifest mode instead of.
This commit is contained in:
parent
afd66d8f40
commit
ad3fb8d380
@ -38,19 +38,6 @@ namespace hgl
|
|||||||
int win_left, win_top;
|
int win_left, win_top;
|
||||||
int win_width, win_height;
|
int win_width, win_height;
|
||||||
|
|
||||||
|
|
||||||
WindowCreateExteraParams createParams;
|
|
||||||
|
|
||||||
{
|
|
||||||
context = DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2;
|
|
||||||
previousDpiContext = SetThreadDpiAwarenessContext(context);
|
|
||||||
|
|
||||||
createParams.bEnableNonClientDpiScaling = FALSE;
|
|
||||||
createParams.bChildWindowDpiIsolation = TRUE;
|
|
||||||
|
|
||||||
previousDpiHostingBehavior = SetThreadDpiHostingBehavior(DPI_HOSTING_BEHAVIOR_MIXED);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
{
|
||||||
RECT win_rect;
|
RECT win_rect;
|
||||||
|
|
||||||
@ -89,7 +76,7 @@ namespace hgl
|
|||||||
nullptr, // handle to parent
|
nullptr, // handle to parent
|
||||||
nullptr, // handle to menu
|
nullptr, // handle to menu
|
||||||
hInstance, // hInstance
|
hInstance, // hInstance
|
||||||
&createParams); // extra parameters
|
nullptr); // extra parameters
|
||||||
|
|
||||||
if (!win_hwnd)
|
if (!win_hwnd)
|
||||||
{
|
{
|
||||||
@ -166,9 +153,6 @@ namespace hgl
|
|||||||
{
|
{
|
||||||
ShowWindow(win_hwnd, SW_SHOW);
|
ShowWindow(win_hwnd, SW_SHOW);
|
||||||
|
|
||||||
SetThreadDpiAwarenessContext(previousDpiContext);
|
|
||||||
SetThreadDpiHostingBehavior(previousDpiHostingBehavior);
|
|
||||||
|
|
||||||
SetForegroundWindow(win_hwnd);
|
SetForegroundWindow(win_hwnd);
|
||||||
SetFocus(win_hwnd);
|
SetFocus(win_hwnd);
|
||||||
|
|
||||||
|
@ -3,12 +3,6 @@
|
|||||||
#include<Windows.h>
|
#include<Windows.h>
|
||||||
namespace hgl
|
namespace hgl
|
||||||
{
|
{
|
||||||
struct WindowCreateExteraParams
|
|
||||||
{
|
|
||||||
BOOL bEnableNonClientDpiScaling;
|
|
||||||
BOOL bChildWindowDpiIsolation;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Windows平台窗口实现
|
* Windows平台窗口实现
|
||||||
*/
|
*/
|
||||||
@ -20,12 +14,6 @@ namespace hgl
|
|||||||
|
|
||||||
MSG win_msg;
|
MSG win_msg;
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
DPI_AWARENESS_CONTEXT context;
|
|
||||||
DPI_AWARENESS_CONTEXT previousDpiContext;
|
|
||||||
DPI_HOSTING_BEHAVIOR previousDpiHostingBehavior;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
bool Create();
|
bool Create();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user