Bug in handling .ini resources |
Post Reply |
Author | |
andreypir
Groupie Joined: 20 August 2015 Status: Offline Points: 10 |
Post Options
Thanks(0)
Posted: 16 June 2017 at 1:54pm |
There appears to be a bug introduced in version 17.2 and still existing in 17.3. When theme definition .ini file is included in resources, like this:
INSIGHT3_THEME_INI TEXTFILE MOVEABLE PURE "Res/Insight3Theme.ini" it is ignored. The settings are loaded correctly by CXTPResourceImages::LoadResources (called from the main frame constructor), but m_strIniFileName is not initialized and remains empty. When later a theme is set, for example CXTPPaintManager::SetTheme(xtpThemeVisualStudio2012Dark) the code tries to use the loaded .ini file, but XTPIniColor is NOP because XTPResourceImages()->m_strIniFileName.IsEmpty(). As a result .ini file theme customization is lost. A simple work around is to initialize m_strIniFileName before a call to SetTheme, for example XTPResourceImages()->m_strIniFileName = _T("INSIGHT3_THEME_INI"); I believe a bugfix should either set m_strIniFileName in CXTPResourceImages::LoadResources or change logic of XTPIniColor.
|
|
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(0)
|
Hello,
Before v17.2 m_strIniFileName was initialized with _T("OFFICE2007BLUE_INI"). In v17.2 with empty sting. So anyway you need to set XTPResourceImages()->m_strIniFileName = _T("INSIGHT3_THEME_INI"); Regards, Oleksandr Lebed |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |