Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delphi cutting glass

I'm using Delphi XE2, and I like glass effects, and I want to "cut" glass as in Windows 7 tablet tools. If you also know how cut a button I'll be happy if you tell me how.

enter image description here

Thanks

like image 364
Astervista Avatar asked Jan 23 '12 13:01

Astervista


People also ask

Is there a machine that cuts glass?

Automatic glass cutting table is a perfect machine for straight and shapes cutting of float glass. With its well compact design, the machine occupies minimum area and the well-designed construction ensures the maximum precision and minimum cutting tolerances.


1 Answers

Drawing in the top area is simply a matter of using a glass frame and painting in the non-client area, or alternatively, using the DwmExtendFrameIntoClientArea API.

The best code sample I have seen for this is the VCL "Ribbon" control, which provides a "QAT" (quick Access toolbar) area, painted in the "non client area".

Note that the author has to think not only about how to render when Vista/Win7 systems which have Glass ON, but also has to decide how to render on WinXp, Win7 and Vista when the Themes engine is off. There is quite a bit of logic in the Vcl.Ribbon.pas (or just Ribbon.pas if you're in XE or earlier) unit dedicated to that.

Look at procedure TCustomRibbonQuickAccessPopupToolbar.NCPaint(DC: HDC); in the Vcl Ribbon sources.

Drawing a non-rectangular "extended area" that protrudes from the bottom is probably a matter of applying a custom window clipping region.

like image 56
Warren P Avatar answered Oct 01 '22 10:10

Warren P