Color changes and the INI files |
Post Reply |
Author | |
rdhd
Senior Member Joined: 13 August 2007 Location: United States Status: Offline Points: 886 |
Post Options
Thanks(0)
Posted: 27 May 2021 at 12:46pm |
I have found INI files that get pulled into the binaries that have all the color settings for various UI elements in CodeJock. We have a need to modify some of the colors such as colors used in docking panes and a few other places. I found the INI editor, which is a nifty tool I might add. Is there some way to load one of the INI file programmatically? This would let, for example, our UX group work on color changes that until now require code changes to effect. That makes experimenting with such changes a bit of a pain. I would like to be able to load a color theme and then call to load a corresponding INI file from disk. Alternatively, we are examining some sort of resource hacker that lets one modify the INI resource using the hacker, which I personally dislike a lot.
|
|
dbrookes
Groupie Joined: 30 August 2019 Location: Australia Status: Offline Points: 70 |
Post Options
Thanks(0)
|
I've kind of played around with this a bit. At one point I patched Office 2016 colorful to have accent coloured selection highlights, I don't do that anymore because I'm lazy. My products primary marketing colour is green, the excel accent colours are fairly close but not exact. I've thought about patching that to be closer but its a lot of colours to change. I also had a request about having some custom ribbon background images for our product. As a test I experimented with adding a custom theme DLL that was derived from the Office 2016 DLL. You can call XTPResourceImages()->SetHandle(hMyDLL, strINI); with your own DLL handle and INI file name. I didn't end up doing this though as I didn't think it would be as easy to maintain. As for adding custom INI files to that DLL I don't know. XTPResourceImages.h has a bunch of predefined INI file names as strings, I guess you could just pass your own string instead.
|
|
rdhd
Senior Member Joined: 13 August 2007 Location: United States Status: Offline Points: 886 |
Post Options
Thanks(0)
|
Hi dbrookes, My issue is a bit more generic as we would have to build all those custom DLLs for each team that wants customization changes. I am hoping to allow our own .ini file to reference a custom colors INI file that I could load programmatically into CodeJock directly. Guess I could read it myself and use low level APIs to change all the colors one API call at a time but am hoping to avoid that. No reply from CJ so apparently what I want isn't possible. Rats.
|
|
Pesci7
Groupie Joined: 27 January 2021 Location: Italy Status: Offline Points: 17 |
Post Options
Thanks(0)
|
CXTPResourceImages has a "SetIniData" that loads an INI as string but also erases all existing values. You can add a "LoadIniData" that has the same code as "SetIniData" but without the RemoveAll() and ClearProperties(). In this way you can overwrite existing properties. I tried the following code that must be called immediately after XTPPaintManager()->SetTheme(paintTheme); and it changes the text size of docking pane. XTPResourceImages()->LoadIniData(lpIniData); |
|
Product: Xtreme ToolkitPro (22.1.0)
Platform: Windows 11 (x64) Language: Visual Studio 2022 (C++) |
|
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 |