Click to See Complete Forum and Search --> : Title Bar Colour


rdines
June 4th, 1999, 01:42 AM
Applications are appearing with a coloured title bar that fades e.g. standard blue to black. How is this done and how can it be programmed in VisC++5 or 6?

Jason Teagle
June 4th, 1999, 02:56 AM
I would imagine they are handling WM_NCPAINT, calculating the size and position of the caption bar and painting it themselves, rather than letting the system do it.

Dave Lorde
June 4th, 1999, 05:38 AM
This is done by handling the WM_NCPAINT message and drawing the caption manually.

It can be done in VC++ 5 or 6, and there is an example of exactly this in the MSDN periodicals documentation for MSJ (Microsoft Systems Journal).

Look in the VC++ MSDN library docs under Periodicals / Periodicals 1997 / Microsoft Systems Journal / January / C++ Q & A, and June / C++ Q & A.

The January article describes the techniques and gives an example, and the June article fixes a few problems with the January article!

I've tried it, and it works very effectively.

Dave

Gomez Addams
June 4th, 1999, 12:23 PM
There are two articles on this topic in the misc section of this site.
I think they are based on the articles Dave mentioned.