I think you are asking how to draw text for a multi-line title in the window's caption region.

This is a complicated process that involves handling of the WM_NCPAINT message. And this already-complicated process has become even more complicated since Vista, and the introduction of DWM composition (Desktop Window Manager) and the DWM API. DWM is the thing responsible for the Aero/glass look in Vista and above.

For a pre-Vista article on the topic, see "Custom Captions (including multi-line captions)" at http://www.codeproject.com/KB/GDI/customcaption.aspx . The code from that article might not work with DWM.

For another pre-Vista article, see Paul DiLascia's C++ Q&A from MSJ issue of June 1997: http://www.microsoft.com/msj/0697/c0697.aspx

In both of the above cases, it is necessary to handle WM_NCACTIVATE, WM_SETTEXT, WM_NCPAINT and many others. And again, post-Vista, it might not work anymore.

If you are targetting post-Vista systems, you might try using some of the newer DWM APIs. One article in Microsoft that seems pertinent is "Custom Window Frame Using DWM" at http://msdn.microsoft.com/en-us/libr...(v=VS.85).aspx . The article uses the DwmExtendFrameIntoClientArea function to extend the frame into the client area, thereby permitting drawing of your own text into the caption frame.

Good luck.

Mike