Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / BlueGUI and SetButtonImage

Author
Message
tiresius
22
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 16th Sep 2008 18:44
Hello all Blue GUI users-

I updated my Radeon 9250 (ancient AGP card) drivers a few weeks ago, and I also received XP service pack 3. Now I'm not sure which one has broken it but my SetButtonImage stuff does not look correct, and sometimes even crashes the program.

I have 32x32 images that I put onto buttons of similar size. Now it looks like 64x64 of the bitmap is being squeezed onto the button, the colors are way off, and like I said sometimes it crashes.

Does anybody with XP service pack 3 have okay luck with SetButtonImage? I might try to rollback the driver and see if that helps... but it is still scary that a new driver has trouble with this straight forward and necessary command.

I'm not a real programmer but I play one with DBPro!
tiresius
22
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 18th Sep 2008 06:03
Ok, no takers. This issue is probably due to my Radeon (via Catalyst) drivers, but I can't dismiss something like this... so I have to code around it.

I have DBpro 6.6 because 6.8 and 6.9 scared me with their issues. Hopefully 7.0 proves to be nice.

Anyway.... well this is what I've found out. SetButtonImage does not like DBPro type images. In the Simple Gadget demos for Buttons I am seeing the attached picture. It's almost as if the wrong color depth is being used or something. Very strange.

Good news is I have a workaround (which I don't like, but hey). If I use SetButtonImage with a filename argument directly (instead of a DBPro image number) it works fine. That means my nice 256x256 icon grid that had lots of 32x32 images on it, will have to be split up into separate files. Poop.

Does the Buttons example run for everybody else? Hopefully it doesn't look like my screenshot (which at least buttons doesn't crash).

I'm not a real programmer but I play one with DBPro!

Attachments

Login to view attachments
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 18th Sep 2008 18:45
Try using different image formats (eg. 24 bit/32 bit/etc.). Also, images from a camera won't work.

[b]Yuor signutare was aresed by a deslyxic mud...
BOX2D V2 HAS HELP FILES! AND A WIKI!
tiresius
22
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 18th Sep 2008 20:19
Yeah one of my ideas (to avoid splitting up the dang grid icons) is to create a bitmap at the same color depth of the user's desktop. Then copy the loaded bitmap onto the other with get image/paste image. And see how that works...

I'm not a real programmer but I play one with DBPro!
tiresius
22
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 23rd Sep 2008 01:06
Ok I found out what the issue is... but can't figure out a way around it. I tried all sorts of set bitmap format type calls, etc. and still no dice.

Here's the issue: SetButtonImage does not like receiving images from DBPro if the desktop color depth is 16-bit. It's almost as if it is expecting 32-bit color images, ALWAYS.

I've done set display mode, I've done set bitmap format, nothing helps. The only way it works is if I load the image directly as a BMP file into the button with SetButtonImage. Not the best workaround. I'm tempted to get the source and see what it's doing, but I don't have VS 2005.

So here's a challenge to you super Bluey Gui users out there. Set your desktop to 16-bit color depth, and try to get the Buttons example project to work.

I'm not a real programmer but I play one with DBPro!
Ian G
16
Years of Service
User Offline
Joined: 3rd Jun 2008
Location: SSM, Canada
Posted: 24th Sep 2008 19:59
You can download the express edition, I was able to get the plugin to compile with VC++ Express 2008 and the Windows SDK.
tiresius
22
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 26th Sep 2008 22:12
Tinkering with C++ is not a solution!!

No seriously I'd be happy with a DBPro workaround. Worse comes to worst I will look into it via VC++ Express 2008 and try to figure out its limitations. But I code in DBPro so I can stay away from these other languages.

I'm not a real programmer but I play one with DBPro!

Login to post a reply

Server time is: 2024-11-23 07:04:35
Your offset time is: 2024-11-23 07:04:35