PDA

Click to See Complete Forum and Search --> : Urgent!!


AAG
Mar 9th, 2001, 06:03 AM
Hello All,
I need some help on creating a graphical button. preferably the way winamp goes about doing theres, i know how to bitblt. but i am unsure if your supposed to use an owner-draw button, or actually load the bitmap and handle when the mouse is over the image, and bitblt it according to what the mouse is doing at that time. i use pure api and hate to use mfc. i feel that it takes away from the fun of c++. i use borland 5.0 c++ compiler. if someone could please direct to a simple program that uses bitblt buttons or if u could instruct me on how to do this. it doesn't matter which way you would like to show. either an owner drawn button or other.., i will be gratefull for either. as long as the focus rectangle does not show. :) thanx

Technocrat
Mar 9th, 2001, 10:12 AM
I answered your other BitBlt question, so you may not have this question anymore but....

With Winamp their buttons are just bitmaps on a window, and they have a huge matrix of button X and Ys positions. So when a user clicks on the window it looks to see if it fits into the X and Y of a button. If it does then it BitBlt the button's down bitmap to that location, till the button is released. If the button is released and the mouse is still in the buttons X and Y pos it runs what ever that button does. Thats why when you look at Winamp skins there are bitmaps for the buttons up and down.

I have made a skinable winamp copy before thats how I know.