I have uploaded a custom caption demo to my website. It does not do XP mainly because I don't have XP to test on so I can't test GetThemeBackgroundRegion to expand the region when the window is in a container. Also it would have been too much for the scope of the demo to verify OS versions, delay load the API calls etc... You can find the project in the GoAsm projects section of my site.

This is what the caption looks like:
Posted on 2004-02-20 23:05:29 by donkey
Cool stuff ;)
(downloaded it)

I guess substracted from the client area?

You should also mention that you draw your own minimize/maximize/close and system menu images
Posted on 2004-02-21 00:40:44 by BogdanOntanu
Thanks Bogdan,

Yeah, subtracted from the region that is passed to WM_NCPAINT with CombineRgn then the rest is passed to DefWindowProc and the stuff that was snipped out is painted by the program. It also checks to make sure that it actually has to be painted as opposed to painting every time an WM_NCPAINT is recieved. Also it mimics every thing that a regular caption can do except the move and resize on the system menu.

The routines are fairly complicated so that it is all self adjusting. It uses the system metrics as opposed to just using fixed values and adjusts itself accordingly. So if you go nuts and set your window properties to a 32 bit high caption it still looks good:
Posted on 2004-02-21 01:06:42 by donkey
It works on XP, no problem. :alright:
Posted on 2004-02-21 08:38:11 by Cuby
Thanks Cuby,

There was a critical error in my judgement, I was not returning the proper value (TRUE) to Windows when the dialog was being disactivated. The result was that child dialogs could not receive the focus, hanging the application. It has been corrected in the new version I just uploaded.
Posted on 2004-02-21 15:22:37 by donkey