Home
Recent changes

ATL code
WTL code
MFC code
C++ code
.Net code
PocketPC code
Miscellaneous

viksoe.dk

Non Rectangular Window sample

Non Rectangular Window sample

A small sample showing how to create a non-rectangular window.

Windows provides an API called SetWindowRgn() that makes it easy for applications to create irregularly shaped windows. Then you need to catch the WM_NCHITTEST, WM_NCACTIVATE and WM_NCPAINT Windows messages to paint your own window background and control the mouse clicks.

Source Code Dependencies

Microsoft WTL 3.0 Library

Download Files

DownloadSource Code (41 Kb)


Written by Bjarke Viksoe.
Article submitted 6/7/2001.