I would have a look at the code to create custom window shapes, basically
you just use a region.
int SetWindowRgn(
HWND hWnd, // handle to window whose window region is to be set
HRGN hRgn, // handle to region
BOOL bRedraw // window redraw flag
);
The SetWindowRgn function sets the window region of a window. The window
region determines the area within the window where the operating system
permits drawing. The operating system does not display any portion of a
window that lies outside of the window region
Chris
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Tom Munro Glass
Sent: Tuesday, July 20, 1999 9:37 PM
To: Multiple recipients of list delphi
Subject: [DUG]: How to draw a non-rectangular control?
I'm trying to develop a button-like control which can be rotated, and I need
to be able to stack a number of these controls next to each other like a
sort of rotated toolbar.
The Paint method uses Canvas.Polygon to draw the rotated rectangular button,
but the overall control window is being erased and is overwriting adjacent
controls. How can I draw this non-rectangular control without touching
anything outside the area of my polygon?
TRotateButton is derived from TCustomControl.
Thanks in advance.
==================================================================
Tom Munro Glass
+----------------------------------------------------------------+
| E-mail: |
| Internet: [EMAIL PROTECTED] |
| Web sites: |
| TMG CONSULTANCY: http://www.tmgcon.com |
| Tewkesbury Web: http://www.tmgcon.com/tewksweb |
+----------------------------------------------------------------+
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz