ホーム » 2022 » 11月 » 08

日別アーカイブ: 2022/11/08

2022年11月
 12345
6789101112
13141516171819
20212223242526
27282930  

カテゴリー

アーカイブ

ブログ統計情報

  • 83,156 アクセス


DPI_AWARENESS_CONTEXT

DPI_AWARENESS_CONTEXT を使おうとして,値をダンプしてみたが…

	#ifdef	_DPI_AWARENESS_CONTEXTS_
	{
		std::terr  <<  _T("DPI_AWARENESS_CONTEXT                     \t")  <<  ((  (DPI_AWARENESS_CONTEXT)+0)                 ) << std::endl ;
		std::terr  <<  _T("DPI_AWARENESS_CONTEXT_UNAWARE             \t")  <<      (DPI_AWARENESS_CONTEXT_UNAWARE             ) << std::endl ;
		std::terr  <<  _T("DPI_AWARENESS_CONTEXT_SYSTEM_AWARE        \t")  <<      (DPI_AWARENESS_CONTEXT_SYSTEM_AWARE        ) << std::endl ;
		std::terr  <<  _T("DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE   \t")  <<      (DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE   ) << std::endl ;
		std::terr  <<  _T("DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2\t")  <<      (DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2) << std::endl ;
		std::terr  <<  _T("DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED   \t")  <<      (DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED   ) << std::endl ;
		}
	{
		DPI_AWARENESS_CONTEXT	dac = ::GetWindowDpiAwarenessContext(hwnd) ;
		std::terr  <<  _T("::GetWindowDpiAwarenessContext(hwnd)      \t")  <<  dac << std::endl ;
		std::terr  <<  std::endl ;
		}
	{
		std::terr  <<  _T("DPI_AWARENESS_INVALID                     \t")  <<       DPI_AWARENESS_INVALID                       << std::endl ;
		std::terr  <<  _T("DPI_AWARENESS_UNAWARE                     \t")  <<       DPI_AWARENESS_UNAWARE                       << std::endl ;
		std::terr  <<  _T("DPI_AWARENESS_SYSTEM_AWARE                \t")  <<       DPI_AWARENESS_SYSTEM_AWARE                  << std::endl ;
		std::terr  <<  _T("DPI_AWARENESS_PER_MONITOR_AWARE           \t")  <<       DPI_AWARENESS_PER_MONITOR_AWARE             << std::endl ;
		}
	{
		DPI_AWARENESS_CONTEXT	dac = ::GetWindowDpiAwarenessContext(hwnd) ;
		DPI_AWARENESS           da  = ::GetAwarenessFromDpiAwarenessContext(dac) ;
		std::terr  <<  _T("::GetAwarenessFromDpiAwarenessContext()   \t")  <<  da << std::endl ;
		std::terr  <<  std::endl ;
		}
	{
		if (::IsValidDpiAwarenessContext(DPI_AWARENESS_CONTEXT_UNAWARE             ))       {	std::terr  <<  _T("DPI_AWARENESS_CONTEXT_UNAWARE             \t") << std::endl ;	}
		if (::IsValidDpiAwarenessContext(DPI_AWARENESS_CONTEXT_SYSTEM_AWARE        ))       {	std::terr  <<  _T("DPI_AWARENESS_CONTEXT_SYSTEM_AWARE        \t") << std::endl ;	}
		if (::IsValidDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE   ))       {	std::terr  <<  _T("DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE   \t") << std::endl ;	}
		if (::IsValidDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2))       {	std::terr  <<  _T("DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2\t") << std::endl ;	}
		if (::IsValidDpiAwarenessContext(DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED   ))       {	std::terr  <<  _T("DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED   \t") << std::endl ;	}
		std::terr  <<  std::endl ;
		}
	{
		DPI_AWARENESS_CONTEXT	dac = ::GetWindowDpiAwarenessContext(hwnd) ;
		if (::AreDpiAwarenessContextsEqual(dac,DPI_AWARENESS_CONTEXT_UNAWARE             )) {	std::terr  <<  _T("DPI_AWARENESS_CONTEXT_UNAWARE             \t") << std::endl ;	}
		if (::AreDpiAwarenessContextsEqual(dac,DPI_AWARENESS_CONTEXT_SYSTEM_AWARE        )) {	std::terr  <<  _T("DPI_AWARENESS_CONTEXT_SYSTEM_AWARE        \t") << std::endl ;	}
		if (::AreDpiAwarenessContextsEqual(dac,DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE   )) {	std::terr  <<  _T("DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE   \t") << std::endl ;	}
		if (::AreDpiAwarenessContextsEqual(dac,DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2)) {	std::terr  <<  _T("DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2\t") << std::endl ;	}
		if (::AreDpiAwarenessContextsEqual(dac,DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED   )) {	std::terr  <<  _T("DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED   \t") << std::endl ;	}
		std::terr  <<  std::endl ;
		}
	#endif

DPI_AWARENESS
WinNT.h で次の様に定義されているがよくわからない.
#define DECLARE_HANDLE(name) struct name##__; typedef struct name##__ *name

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.