Home  »  Windows  »  Source Code
non-client control 1-0
non-client control 1-0
Authorize : Freeware Free

Requirements : WTL 7.1 or higher

Publisher : viksoe.dk

OfficeWebsite : http://www.viksoe.dk/

OS Support : Windows XP, 2000, 98, Me

Servers
  • USA
Content
Testing non-client painting in Windows.
EditBy: Non Client painting in Windows allows you to custom paint the frames, Border and caption of your window. Two important messages need to be handled: the WM_NCCALCSIZE, which determines the size of the non-client area, and WM_NCPAINT where you do the painting.
The WM_NCPAINT message is sent to all windows just prior the usual WM_PAINT message. Unlike WM_PAINT, you need to grab hold of the Device Context (HDC) yourself using the GetWindowDC API. Once set up, you can do custom painting of any sort of the Window border and caption.
The sample included here custom paints my old Property Grid control with bulky and slanted headers. Its not very pretty, but shows that it is really not too difficult to Create new headerbars for the common ListView control.
There are only a few samples available from Microsoft to demonstrate this technique. Its probably due to the FACT that they change the appearance (theme) of the standard controls from time to time (OS to OS), and too much custom painting will create non-compliant controls in the end. I have actually seen comments like if theyre writing the code, they must know what theyre doing. As someone who writes code, I appreciate the vote of confidence, but knowing how to program isnt the same thing as knowing what youre doing. Knowing when not to write a certain piece of code is probably a much more powerful giFT. you can free download Non-Client control 1.0 now.

Hot Download

New Download