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.
Thanks
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With