Thread View: borland.public.cppbuilder.nativeapi
5 messages
5 total messages
Started by Liam Mullins
Fri, 07 Jul 2006 21:20
Update Layered Window
Author: Liam Mullins
Date: Fri, 07 Jul 2006 21:20
Date: Fri, 07 Jul 2006 21:20
44 lines
3325 bytes
3325 bytes
(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?
Re: Update Layered Window
Author: Michel Leunen
Date: Sat, 08 Jul 2006 07:55
Date: Sat, 08 Jul 2006 07:55
19 lines
1638 bytes
1638 bytes
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. 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/ ----------------------------------------
Re: Update Layered Window
Author: Liam Mullins
Date: Sat, 08 Jul 2006 15:58
Date: Sat, 08 Jul 2006 15:58
30 lines
2261 bytes
2261 bytes
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
Re: Update Layered Window
Author: Michel Leunen
Date: Sat, 08 Jul 2006 20:17
Date: Sat, 08 Jul 2006 20:17
17 lines
1427 bytes
1427 bytes
Liam Mullins wrote: > 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/ ----------------------------------------
Re: Update Layered Window
Author: Liam Mullins
Date: Mon, 10 Jul 2006 04:10
Date: Mon, 10 Jul 2006 04:10
44 lines
2639 bytes
2639 bytes
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: > 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads