Browse Source

Win32 HiDPI applied

Hongtae Kim 7 years ago
parent
commit
dace6c0034
2 changed files with 17 additions and 2 deletions
  1. 5
    2
      TestApp1/TestApp1.cpp
  2. 12
    0
      TestApp1/TestApp1.vcxproj

+ 5
- 2
TestApp1/TestApp1.cpp View File

@@ -52,8 +52,11 @@ public:
52 52
 			}),
53 53
 			DKFunction([this](const DKWindow::MouseEvent& e)
54 54
 			{
55
-				//DKLog("MouseEvent: %d, btn:%d, location:%.1f, %.1f, delta:%.1f, %.1f",
56
-				//	  e.type, e.buttonId, e.location.x, e.location.y, e.delta.x, e.delta.y);
55
+				if (e.type != DKWindow::MouseEvent::Move || window->IsMouseHeld(0))
56
+				{
57
+					DKLog("MouseEvent: %d, btn:%d, location:%.1f, %.1f, delta:%.1f, %.1f",
58
+						e.type, e.buttonId, e.location.x, e.location.y, e.delta.x, e.delta.y);
59
+				}
57 60
 			})
58 61
 		);
59 62
 	}

+ 12
- 0
TestApp1/TestApp1.vcxproj View File

@@ -101,6 +101,9 @@
101 101
       <SubSystem>Windows</SubSystem>
102 102
       <GenerateDebugInformation>true</GenerateDebugInformation>
103 103
     </Link>
104
+    <Manifest>
105
+      <EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
106
+    </Manifest>
104 107
   </ItemDefinitionGroup>
105 108
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
106 109
     <ClCompile>
@@ -114,6 +117,9 @@
114 117
       <SubSystem>Windows</SubSystem>
115 118
       <GenerateDebugInformation>true</GenerateDebugInformation>
116 119
     </Link>
120
+    <Manifest>
121
+      <EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
122
+    </Manifest>
117 123
   </ItemDefinitionGroup>
118 124
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
119 125
     <ClCompile>
@@ -131,6 +137,9 @@
131 137
       <OptimizeReferences>true</OptimizeReferences>
132 138
       <GenerateDebugInformation>true</GenerateDebugInformation>
133 139
     </Link>
140
+    <Manifest>
141
+      <EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
142
+    </Manifest>
134 143
   </ItemDefinitionGroup>
135 144
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
136 145
     <ClCompile>
@@ -148,6 +157,9 @@
148 157
       <OptimizeReferences>true</OptimizeReferences>
149 158
       <GenerateDebugInformation>true</GenerateDebugInformation>
150 159
     </Link>
160
+    <Manifest>
161
+      <EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
162
+    </Manifest>
151 163
   </ItemDefinitionGroup>
152 164
   <ItemGroup>
153 165
     <ClInclude Include="Win32\Resource.h" />