I use a couple of bitmaps as captions to pushbuttons.
Just recently one of our guys used a new set of bitmaps to replace our original ones and he found a very odd thing and asked me to look at it.
One bitmap is a 100 x 80 GIF showing a standard cube type cardboard box in a 3d corner to front angle (I'm sure there's a word for that...isometric comes to mind but I don't know for sure). The top of the box is open. There are lots of straight lines in the image.
When we put this image on a pushbutton we can clearly see that the lines in the image are not 'straight', even though when you look at the image Paint, for instance, they are.
I had a look and found that when you take this image and put it on the button, you can see the break(s) in the lines (it looks a little like the type of 'tearing' you get onscreen in games).
When you take the same image and put it onto a simple static, the image displays fine. No sign that the lines are broken. This happens on a couple of the images, not just that one.
Has anyone else seen this?
Bitmap on pushbutton oddity
Bitmap on pushbutton oddity
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com
Real Business Applications Ltd
http://www.rbauk.com
Re: Bitmap on pushbutton oddity
Hi Regan,
Is the bitmap resized to fit the button? I noticed that the resize sometimes gives an ugly result. I have al my bitmaps in three sizes, so I can use the size according to the button.
Creating a font is also a solution, this way you can use every size.
Is the bitmap resized to fit the button? I noticed that the resize sometimes gives an ugly result. I have al my bitmaps in three sizes, so I can use the size according to the button.
Creating a font is also a solution, this way you can use every size.
Re: Bitmap on pushbutton oddity
What kind of button are you using? DCPUSHBUTTON or DCPUSHBUTTONXP?
DCPUSHBUTTONXP will try to fit the bitmap to the button by sizing it.
This can cause the effect you are seeing.
If you use CAPTIONARRAY with DCPUSHBUTTONXP, you can specify the exact size you want the bitmap on the button and where you want it placed on the button.
DCPUSHBUTTONXP will try to fit the bitmap to the button by sizing it.
This can cause the effect you are seeing.
If you use CAPTIONARRAY with DCPUSHBUTTONXP, you can specify the exact size you want the bitmap on the button and where you want it placed on the button.
The eXpress train is coming - and it has more cars.
Re: Bitmap on pushbutton oddity
Hi Chrisskiman wrote:Hi Regan,
Is the bitmap resized to fit the button? I noticed that the resize sometimes gives an ugly result. I have al my bitmaps in three sizes, so I can use the size according to the button.
Creating a font is also a solution, this way you can use every size.
No, there is no scaling involved.
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com
Real Business Applications Ltd
http://www.rbauk.com
Re: Bitmap on pushbutton oddity
Hi Rogerrdonnay wrote:What kind of button are you using? DCPUSHBUTTON or DCPUSHBUTTONXP?
DCPUSHBUTTONXP will try to fit the bitmap to the button by sizing it.
This can cause the effect you are seeing.
If you use CAPTIONARRAY with DCPUSHBUTTONXP, you can specify the exact size you want the bitmap on the button and where you want it placed on the button.
It was originally a DCPUSHBUTTON but I tried DCPUSHBUTTONXP as well with the same result.
I could give you a copy of the bitmap on Tuesday (Monday is a bank holiday here) so you could see for yourself... I didn't think there was any point in me giving you code...
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com
Real Business Applications Ltd
http://www.rbauk.com
Re: Bitmap on pushbutton oddity
Bank holiday? Those holidays never stop me from my appointed rounds.I could give you a copy of the bitmap on Tuesday (Monday is a bank holiday here)
Ok, send it to me on Tuesday.
The eXpress train is coming - and it has more cars.