On Tue, 28 Jan 2014 01:32:05 -0800 (PST) Armel wrote:
A> Is there a guide to "how should I code High DPI handling in a wxWidgets
A> application?" or a "state of the art".
For OS X you should provide all your bitmaps in doubled up resolution. For
MSW we don't do anything like this and I don't really know whether we
should. In any case, DPI awareness should IMO be mostly implemented inside
the library and not in the applications using it. So whatever bugs there
are, they should be fixed in wx.
Did you test your program under Windows 8.1 with high DPI? Do you see any
problems with it? And, if so, which ones?
>I just tested the property grid sample built from the near last version of wx r75689 (off-the-shelf project nothing touched), all the icons in the toolbar or the property grid are desperately small :(
>Is this normal?
>
I "fixed" this in my application by specifically putting:
<dpiAware>False</dpiAware>
into my manifest. Now windows auto-scales my images. (Since it's in my manifest, that overrides the dpi-api call that wx makes)
VZ> (wxOSX uses "@2x" suffix, so we could start by handling this,
VZ> even though Microsoft recommends having all of "@1.25x", "@1.5x" and "@2x")
And be ready to scale to something in between (or bigger) :-)
I was just playing with that and set mine to 175% and 300% - interestingly, I couldn't set it to 75% (the UI corrected it to 100 when the combo lost focus)
Dave
On Wed, 29 Jan 2014 00:23:16 -0800 (PST) Armel wrote:
A> Le mardi 28 janvier 2014 23:26:18 UTC+1, Dave a écrit :
A> >
A> > I "fixed" this in my application by specifically putting:
A> > <dpiAware>False</dpiAware>
A> > into my manifest. Now windows auto-scales my images. (Since it's in my
A> > manifest, that overrides the dpi-api call that wx makes)
...
A> Thanks Dave, it will be at least a quick fix until I can invest time on
A> this matter.
We probably should simply remove SetProcessDPIAware() call from our code.
If it hurts more than helps, there doesn't seem to be any reason to keep
it... But I'm surprised that removing/disabling it doesn't have any
negative consequences for the non-bitmap-based controls. I'd expect them to
look worse without it, don't they?
Regards,
VZ
>To: wx-u...@googlegroups.com
>Sent: Wednesday, January 29, 2014 7:48 AM
>Subject: Re: Re[2]: Guide to High DPI handling in wxWidgets?
The other way to look at it is to document that WX does call it. The user can easily set their "corrected" awareness in the manifest. Once you've set it in the manifest any call to SetProcessDPIAware (or the new win8.1 SetProcessDPIAwareness) will fail. But if wx isn't rescaling images, then I'd say we're not really aware :-)
Dave
"The SetProcessDPIAware function in Windows Vista and later versions sets the current process as DPI-aware. However, the use of the SetProcessDPIAware function is discouraged. For example, if a DLL caches DPI settings during initialization, invoking SetProcessDPIAware in your application might generate a possible race condition. For this reason, we recommend that an application enable DPI awareness by using the application's assembly manifest rather than by calling SetProcessDPIAware."
"By adding the <dpiAware> element to your application's assembly manifest, you mark your application as being DPI-aware. The user32.dll module, which provides Windows user interface functionality, checks the application's DPI awareness setting. If an application is determined to be DPI-aware, the user32.dll module calls SetProcessDPIAwareon behalf of the application."
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
To unsubscribe, send email to wx-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wx-users
To unsubscribe, send email to wx-users+u...@googlegroups.com
or visit http://groups.google.com/group/wx-users
--Eran Ifrah,
Author of codelite, a cross platform open source C/C++ IDE: http://www.codelite.orgCodeLite IDE Blog: http://codeliteide.blogspot.com/
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
To unsubscribe, send email to wx-users+u...@googlegroups.com
or visit http://groups.google.com/group/wx-users
Dave