 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Liam Mullins Guest
|
Posted: Sat Jul 08, 2006 2:20 am Post subject: Update Layered Window |
|
|
(sorry for the cross post.. this was also posted in graphics. I'm ready
for the flames)
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 |
|
 |
Michel Leunen Guest
|
Posted: Sat Jul 08, 2006 8:10 am Post subject: Re: Update Layered Window |
|
|
Liam Mullins wrote:
| Quote: | My question is this: How does Konfabulator Window Blinds etc.. use the
Layered window api to display controls?
|
Sorry, I've no answers to your questions but did you look at the SDK
Yahoo provides? Maybe there are some good tips to grab.
BTW, there is not much traffic on these groups during the week-end and
you should try asking in the Delphi graphics group which is more active.
Michel
--
----------------------------------------
Michel Leunen
mailto: see my homepage.
C++Builder, BCC5.5.1 Web site:
http://www.leunen.com/
---------------------------------------- |
|
| Back to top |
|
 |
Liam Mullins Guest
|
Posted: Sat Jul 08, 2006 8:58 pm Post subject: Re: Update Layered Window |
|
|
Michel Leunen wrote:
| Quote: | Liam Mullins wrote:
My question is this: How does Konfabulator Window Blinds etc.. use the
Layered window api to display controls?
Sorry, I've no answers to your questions but did you look at the SDK
Yahoo provides? Maybe there are some good tips to grab.
|
Thank you for answering my question Michel,
I am not sure what SDK you are referring to (does Konfabulator have an
SDK?). The rest of their development tools are centered around web
development or their search, map, and commerce capabilities.
| Quote: |
BTW, there is not much traffic on these groups during the week-end and
you should try asking in the Delphi graphics group which is more active.
|
Thank you for that suggestion! As I had mentioned earlier, I am new to
the forums and I think I already am in for some flames. I first posted
to the graphics (builder) group but then realized that the problem
really comes down to an API problem (technically) since I am using the
win API to Update the window.
Thank you again for your help. I am really interested in finding out how
this is done.
Liam
|
|
| Back to top |
|
 |
Michel Leunen Guest
|
Posted: Sun Jul 09, 2006 1:17 am Post subject: Re: Update Layered Window |
|
|
Liam Mullins wrote:
| Quote: | I am not sure what SDK you are referring to (does Konfabulator have an
SDK?).
|
Isn't konfabulator a Yahoo widget application?
I found this:
http://widgets.yahoo.com/workshop/
Michel
--
----------------------------------------
Michel Leunen
mailto: see my homepage.
C++Builder, BCC5.5.1 Web site:
http://www.leunen.com/
---------------------------------------- |
|
| Back to top |
|
 |
Liam Mullins Guest
|
Posted: Mon Jul 10, 2006 8:10 am Post subject: Re: Update Layered Window |
|
|
Remy,
I really respect your work and advice, I was curious if you would be so
kind to help with my problem. I really have hit a brick wall and have
exhausted every resource I could find on the subject
Best Regards
Liam Mullins
Liam Mullins wrote:
| Quote: | Michel Leunen wrote:
Liam Mullins wrote:
My question is this: How does Konfabulator Window Blinds etc.. use
the Layered window api to display controls?
Sorry, I've no answers to your questions but did you look at the SDK
Yahoo provides? Maybe there are some good tips to grab.
Thank you for answering my question Michel,
I am not sure what SDK you are referring to (does Konfabulator have an
SDK?). The rest of their development tools are centered around web
development or their search, map, and commerce capabilities.
BTW, there is not much traffic on these groups during the week-end and
you should try asking in the Delphi graphics group which is more active.
Thank you for that suggestion! As I had mentioned earlier, I am new to
the forums and I think I already am in for some flames. I first posted
to the graphics (builder) group but then realized that the problem
really comes down to an API problem (technically) since I am using the
win API to Update the window.
Thank you again for your help. I am really interested in finding out how
this is done.
Liam
Michel |
|
|
| 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
|
|