 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Liam Mullins Guest
|
Posted: Sun Jul 09, 2006 8:11 am Post subject: Update Layered Window |
|
|
I am programming in Builder, but I thought maybe someone had a solution
to this problem.
Hello all,
this is actually my first post to the borland groups, but have been
programming using borland c++ for a long time. I recently hit a black
hole and am struggling to find a way out/around it.
The problem:
I am creating a skinned application using the UpdateLayeredWindow API
and currently have a per-pixel rendered form that utilizes the alpha
channel in a png image. If anyone is curious, I am creating a GDI+
instance and passing the image to the UpdateLayeredWindow without the
need to pre-multiply the RGB channels with the alpha.
This is all fine and good, but I am now presented with the ever elusive
problem of painting controls on the form. Yes I know the usual windows
paradigm is no longer used (i.e. WM_PAINT) and that the image is passed
through a DC to windows and Windows does the repainting. I have read
every single document, post, forum and api reference that exists on the
net. Microsoft (as mentioned in almost every related post) does a
sub-par job of describing the per-pixel method of Layered Windows.
This skinning can obviously be done (i.e. Konfabulator, Window Blinds
etc...) but I am very curious what methods they use for displaying
controls. I have come up with two methods to solve drawing controls:
1) Create one composite image of every 'control' (which is actually just
individual image) that is passed to updated layered window every time a
state changes (i.e. mouse over, timed events etc..)
2) Create the layered window and overlay another window on top to
simulate the existence of controls on the main form
These two options obviously have a LOT of draw backs. One of the main
drawbacks of the second method is that I have also created controls with
an alpha channel that display a gel-like button etc.. and to draw them
correctly you obviously cannot use an overlayed form.. .the transparency
only goes as deep as the parent window. Using the first option, I can
only imagine, would smoke a processor in a matter of minutes. Speaking
of which, why doesn't the rendering utilize the GPU like Mac's Quartz
engine does?
My question is this: How does Konfabulator Window Blinds etc.. use the
Layered window api to display controls? |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|