Dynamic Text on Bitmap Button
-
I have created dynamic buttons and loaded a plain bitmap on them. Now I want to place a text on those bitmapped buttons, how can we do that?
-
I have created dynamic buttons and loaded a plain bitmap on them. Now I want to place a text on those bitmapped buttons, how can we do that?
As far as i know the "default" buttons given to you by windows don't support both images and text on a button, so i'd say you have 3 possibilities: 1. Use a third party custom button which supports both text and image 2. Handle drawing of the button yourself, you have to be able to draw all its possible states, like pressed, disabled, ... and adding theme support is usually also a good idea 3. This is imho the easiest and simplest solution, draw the text onto the bitmap you place on the buttons. So load the bitmap, draw text on it and feed it to the button. If you need to change the text, load it again, draw the new text, feed it to the button. I hope this helps, good luck.
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <
-
As far as i know the "default" buttons given to you by windows don't support both images and text on a button, so i'd say you have 3 possibilities: 1. Use a third party custom button which supports both text and image 2. Handle drawing of the button yourself, you have to be able to draw all its possible states, like pressed, disabled, ... and adding theme support is usually also a good idea 3. This is imho the easiest and simplest solution, draw the text onto the bitmap you place on the buttons. So load the bitmap, draw text on it and feed it to the button. If you need to change the text, load it again, draw the new text, feed it to the button. I hope this helps, good luck.
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <
Thnx a-lot I will go with drawing text.