Question

I'm looking to extend/override how Windows 7 draw's its standard Windows and controls. Right now I'm doing preliminary research on how to modify the standard UI to make it just a little bit more touch friendly for a project I'm working on.

Specifically what I would like to do is modify how W7 draws borders around its Windows, and how to modify the Window Control Buttons (close, minimize, exit etc). This is intended to be a Global change, and would affect how all windows on the system are drawn. Honestly, I'm looking for functionality that is very similar to what WindowBlinds does, at least for this part of the project...

As for how to accomplish the goal, I believe the best course of action would be to create a service that watches each process, or inject a DLL in to each process, that would watch its Message Queue for any messages involved with painting the window. It would then override that event, drawing the window (or control) how I want it to be drawn.

Unfortunately I'm a bit sketchy on how to actually do that... Does anyone have any suggestions on how best to approach this? Any examples, in any language (I will probably use C# or C++) would be appreciated!

Was it helpful?

Solution

There is no supported Windows API to replace the window visuals system-wide. Doing so requires use of undocumented APIs and hacky solutions. In turn, these kinds of hacks are likely to make your users' systems more unstable. I strongly recommend against it.

If you wish to adjust the visuals for you own app, you can use ::DwmExtendFrameIntoClientArea to allow you to draw your own title region (as, for example, Office does). See http://msdn.microsoft.com/en-us/library/bb688195(VS.85).aspx

Martyn

OTHER TIPS

You should use an existing themeing system, such as this one.

You can also use UXTheme.dll, with this editor.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top