How to code a skinned UI like in Windows Media Player?
-
Thanks for the link, but that tutorial only shows how to create non-rectangular windows with a bitmap background. I don't need a non-rectangular window, but a normal window with non-rectangular buttons on it, by using a colored mask (the top image in http://img130.imageshack.us/img130/5195/wmpbandimages.png[^]).
-
Thanks for the link, but that tutorial only shows how to create non-rectangular windows with a bitmap background. I don't need a non-rectangular window, but a normal window with non-rectangular buttons on it, by using a colored mask (the top image in http://img130.imageshack.us/img130/5195/wmpbandimages.png[^]).
Sorry, but your title asked for information on "skinned UI". I'm not sure how to do the buttons you are asking for, but probably something similar. Try the articles here on CodeProject, it's quite likely some other CP member has written about it.
It's time for a new signature.
-
Sorry, but your title asked for information on "skinned UI". I'm not sure how to do the buttons you are asking for, but probably something similar. Try the articles here on CodeProject, it's quite likely some other CP member has written about it.
It's time for a new signature.
-
Rather than using 3rd party gui library its hard to say its possible. If you can use some library like SkinCrafter then you can easily get what you want.
-
Rather than using 3rd party gui library its hard to say its possible. If you can use some library like SkinCrafter then you can easily get what you want.
Of course it must be possible, I'm pretty sure that no library was used in the WMP desk band either. SkinCrafter looks like it's hugely overkill for my (relatively simple) problem.
-
Sorry, but your title asked for information on "skinned UI". I'm not sure how to do the buttons you are asking for, but probably something similar. Try the articles here on CodeProject, it's quite likely some other CP member has written about it.
It's time for a new signature.
OK, I've done some more searching, but unfortunately, I couldn't find any examples of how to use such a multi-colored mask. However, I think that I should take the following approach: for each color in the multi-colored mask, create a 2-color mask with the current color replaced by black, and all other colors replaced by white (by using something like ReplaceColor at How to replace a color in a HBITMAP[^]). Then, those 2-color masks can be used to BitBlt the individual segments (that might come from different state images) into one single image. Is this the right approach? I want to be sure that I haven't missed anything before starting to implementing this.
-
OK, I've done some more searching, but unfortunately, I couldn't find any examples of how to use such a multi-colored mask. However, I think that I should take the following approach: for each color in the multi-colored mask, create a 2-color mask with the current color replaced by black, and all other colors replaced by white (by using something like ReplaceColor at How to replace a color in a HBITMAP[^]). Then, those 2-color masks can be used to BitBlt the individual segments (that might come from different state images) into one single image. Is this the right approach? I want to be sure that I haven't missed anything before starting to implementing this.
-
Tim De Baets wrote:
Is this the right approach?
Sorry but I couldn't say as I've never tried it. I offered the window skinning tutorial as that was something I have done in the past.
It's time for a new signature.
I cant understand why you are going towards complicity. Just use SkinCrafter or some other Skining library like DSkin which has Vista, Windows MPlayer skins and lots more. you just need to use their .dll and .cpp and .h in your project and a few lines of coding.
-
I cant understand why you are going towards complicity. Just use SkinCrafter or some other Skining library like DSkin which has Vista, Windows MPlayer skins and lots more. you just need to use their .dll and .cpp and .h in your project and a few lines of coding.
-
I cant understand why you are going towards complicity. Just use SkinCrafter or some other Skining library like DSkin which has Vista, Windows MPlayer skins and lots more. you just need to use their .dll and .cpp and .h in your project and a few lines of coding.
As I already said, I don't want to use a full-blown library for such a small and simple skinned area with just a few buttons. And there's also the matter of personal interest; I would really like to know how it's done. Using a library just because you don't know how to do something, is a wrong reflex.