Non-Client control Icon

Non-Client control

Testing non-client painting in Windows.

Non-Client controlOverview

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. It's 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. It's 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 they're writing the code, they must know what they're doing." As someone who writes code, I appreciate the vote of confidence, but knowing how to program isn't the same thing as knowing what you're doing. Knowing when not to write a certain piece of code is probably a much more powerful giFT.

NEW

Fixed some bugs.

Non-Client controlInformation

Version
1.0
Date
12.23.08
License
Free
Language
English
File Size
55KB
Developer
Category
Operating Systems
Windows XP, 2000, 98, Me
System Requirements
No additional system requirements.
GMail Drive Icon
GMail Drive allows you to use Gmail as a storage medium.
Free
BVRDE Icon
BVRDE is an Integrated Development Environment (IDE) for C and C++.
Free
RTF Script Editor Icon
A RTF based editor with syntax highlighting.
Free
ASMIL Icon
ASM to IL compiler
Free
CPathMonitor Icon
Uses the FindFirstChangeNotification Win32 API to detect changes in a file path.
Free
Console Screen class Icon
The class wraps the Win32 Console API.
Free
Database wrappers Class Icon
A set of classes wrapping the ODBC and OLE DB database APIs.
Free
Cool Tabs Icon
Includes DevStudio 6 and VisualStudio.NET folder tabs.
Free
More
Sublime Text (64-Bit) Icon
Create and edit commands, text files, macros, and regular expressions.
Demo
6-bit Binary Compression Icon
This is a fast 6-bit compression routine
Free
NetBeans IDE Icon
Fully-featured Java IDE written completely in Java, with many modules available.
Free
ArgoUML Icon
ArgoUML is the leading open source UML modeling tool.
Free
PE Viewer Icon
Tool to view/edit Windows Portable Executable files.
Free
Hex Workshop Icon
Hex edit, cut, copy, paste, insert, fill, and delete binary data.
Demo
Notepad++ (64-bit) Icon
Take full advantage of highly executable, multi-language, simultaneous text and source code editing.
Free
Hex Editor Neo Icon
Binary Data and File Data Editing Software Utility. Hex Editor Download
Trial
More