Window Blinds
Back To SITEMAP
Per-pixel-alpha Frames, Window Blinds'' Secrets?
Author: Pavel Gritsay
Have you ever wonder why only window blinds do have nice skins whose windows do not have jagged or sharp edges? Apparently, that''s not a trivia task. So, let''s go and look under the skin.
What are the semitransparent skins required for?
You might know that it''s possible to set a region to any window using Windows API (::SetWindowRgn method). When trying try to make a non-rectangular shapes you will face the fact that your windows do have jagged edges, which are pixelized. To resolve this issue the alpha channel is coming on stage. Per-pixel-alpha is the best solution for the situation.
But per-pixel-alpha might NOT be applied to child windows and that''s why it might NOT be used for window frames'' smoothing in most of the cases... however...
Here is the trick window blinds is using, they remove the frame from the window at all. And create additional 5 pop up windows with WS_EX_LAYERED style set and synchronize them with the main window. So, each side of window frame became a separate window. Don''t you believe? Neither did I, but that''s true!
You may ask why five alpha-channeled windows when there are only four frame sides? Well, the windows'' buttons like close-min-max are displayed in a separate window also, that''s done for mouse over animation and etc.
It''s the only way the greatest operation system lets us achieve semi transparency in the frames.
Weren''t you surprised?
Nevertheless, now you know one more secret of Windows Skins Industry.
Skins are the fashion of software and you should decide whether to be in or not.
Pavel Gritsay,
Expert of User Interface Design. http://skincrafter.com
...
Orange County Web Design