[Interest] Question about correct way to initialize HiDPI support

David M. Cotter dave at kjams.com
Mon Jan 13 19:47:16 CET 2020


note i did this too:

	#if OPT_WINOS
	//	this part ensures that when a window is moved from one monitor to
	//	another, and they have differnt scale factors, that the window
	//	resizes itself to the scale factor
	{
		typedef BOOL				(*SetProcessDpiAwarenessT)(int value);
		QLibrary					user32("user32.dll", NULL);
		SetProcessDpiAwarenessT		SetProcessDpiAwarenessD =
			(SetProcessDpiAwarenessT)user32.resolve("SetProcessDpiAwarenessInternal");

		if (SetProcessDpiAwarenessD) {
			SetProcessDpiAwarenessD(1); //PROCESS_PER_MONITOR_DPI_AWARE
		}
	}
	#endif


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20200113/dad8bab5/attachment.html>


More information about the Interest mailing list