Hello,
An user of my app reported that the main frame and all the interface of
my app (all controls/widgets and their contents) appear blured under
windows 10.
In order to fix the blur effect and be able to work normally with my
app, he has to change DPI settings as explained by Microsoft here:
https://support.microsoft.com/en-us/windows/make-older-apps-or-programs-compatible-with-windows-10-783d6dd7-b439-bdb0-0490-54eea0f45938
When he changes his DPI settings, he also reports that the icon of my
app disappears.
* The frame icon is replaced by an icon representing three colored
blocks. That's probably some windows or WX default, as I don't provide
such an icon myself.
* The taskbar icon in notification zone is replaced by nothing, i.e.
blank/transparent space
The computer where he observed the problem was:
HP laptop with windows 10, Processor intel core i5 (dualcore,
hyperthreading, max frequency 2,7 GHz), 8 GB RAM, SSD+HDD, 15,6''
screen with max resolution 1920 x 1080, scaling 140%
He also tried on a older computer and he doesn't have the problem on it:
Toshiba laptop with win10, Processor intel pentium (dualcore, 2,0 GHz),
4 GB RAM, HDD only, 15,6'' screen with max resolution 1366 x 768, no scaling
Can/should I do something, and if yes, what, so that:
1. He doesn't have to change DPI settings
2. Icons don't disappear when DPI settings are set
I don't know well where the problem is in the code.
Here's how I set the frame icon, in main window's constructor:
class MainWindow: wxFrame { ... }
MainWindow::MainWindow (): wxFrame(...) {
...
SetIcon(wxIcon("logo.ico", wxBITMAP_TYPE_ICO, 32, 32));
...
}
And here where I similarely set it for the taskbar icon:
class TrayIcon: wxTaskBarIcon { ... };
void TrayIcon::Install () {
...
SetIcon(wxIcon("logo.ico", wxBITMAP_TYPE_ICO, 32, 32), wxGetApp()
.mainWindow ->GetTitle());
...
}
Of course, the named logo.ico file is indeed present in the same
directory as the executable and WXWidgets' DLLs.
That icon appears correctly when DPI settings aren't set, so it's
correctly loaded.
I also have added a resource file .rc in my project, which includes
WXWidgets resources:
#include "wx/msw/wx.rc"
Which, among others, includes an XML manifest file that I took
unmodified from WXWidgets.
What am I doing wrong ?
Do I have forgotten something ?
Thank you for your answers.