ITQuants blog

By Philippe Bonneau on 9/15/2014 5:07 PM

I was asked recently if I knew how to change the color of the titlebar on Sophis Risque in order to catch the user attention. At first, I've made a wrong answer: "Easy, you just need to paint on the WM_NCPAINT as Sophis Risque does it when the simulation mode is selected (and as I've developed it on the v4)" !! ...

Unfortunately, this mode does not work anymore as it was developed for Window 95/2000.... A lot of articles can be found on the Net (like codeproject or codeguru), but no one gives the code to run it with the themes that were developed on XP, or on Vista/7 when the Desktop Window Manager service is started. For example, when the Windows Desktop Manager is disabled, as best effort, and using the MS SDK functions ::DrawCaption and ::DrawFrameControl, the dialog will look like this one:

Note that the minimize, maximize and close buttons do not have the new style as expected.

The goal of this post is to describe how to do it.

Search blog