IwaoDev

この画面は、簡易表示です

2022/11/08

DPI_AWARENESS_CONTEXT

投稿日 by Iwao

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

この投稿は役に立ちましたか? 役に立った 役に立たなかった 0 人中 0 人がこの 投稿 は役に立ったと言っています。



top