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