Discussion Locked

Non-rectangular apps in visual C++

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How do you create non-rectangular applications in visual C++. Like all those cool skin applications. Sample code would be really nice.

7 replies

by achp

The window form can be changed by using the SetWindowRgn API function.

Mutual placement of window's client area, caption, buttons, menu and other components can be redefined by handling the WM_NCCALCSIZE, WM_NCHITTEST, WM_NCPAINT messages.

By handling other WM_NC... messages you can even redefine the default behavior of those components. Still, it's important that the client area remains rectangular.

by stevez

You need to check MSDN for clipping, cuase that's what you'll want if you don't want those rectangular windows. For ur buttons you'll want an OWNERDRAW option to draw them urself (custom ones).

This discussion is closed to new replies.