Re: Force classic theme for application (windows)




"Xymox" <Xymox@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:59C953AC-AB83-402E-9ED5-4B8AC6F750F1@xxxxxxxxxxxxxxxx
"John Carson" wrote:

Presumably Microsoft has made it hard to customize NC areas in order to
encourage a consistent user interface across all programs. Back in the
DOS
days, every program did things its own way. Windows was meant to put a
stop
to that.

So is the conclusion of my question about forcing the GUI ergonimists have
designed for an application :

1) Owner draw all used objects, the client and NC area's, so they use the
preferred colors

That should work, though it will be a lot of work. DrawFrameControl may be
some help here.

2) Use the suggestion Cristian Astor has made by

You can set a custom theme for a particular application with :
OpenThemeFile()
ApplyTheme() with flags = 2
WM_THEMECHANGED

I have not tried this, but maybe it could be a solution.

OpenThemeFile and ApplyTheme both appear to be undocumented functions (the
theme API in general is rather poorly documented). Google for them and you
will find them mentioned in Wine documents (Wine being the project to clone
the Win32 API on Linux). Christian seems to have an encyclopedic knowledge
of the Win32 API, both documented and undocumented.

If you can get this to work, then it would seem to be the simplest solution.

3) Use some kind of defer functionality. I have read MS has made a tool
which is able to defer some API functions to own custom made functions.
Maybe
defer the Getting of system colors so NC area's are painted using custom
colors.
It is called DETOURS

http://research.microsoft.com/research/downloads/Details/10e5d78c-592c-419d-a53e-bae8dbd81801/Details.aspx

I am aware of this software, but I have never tried it. I suspect it will
involve a fair bit of detective work to figure out exactly how windows
paints NC areas and how best to modify the process.


--
John Carson


.