DrawBitmap() fails on Memory DC

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
User avatar
doublemax
Moderator
Moderator
Posts: 19158
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: DrawBitmap() fails on Memory DC

Post by doublemax »

Just change the array from "const char" to "const unsigned char"
Use the source, Luke!
frenzy
Earned a small fee
Earned a small fee
Posts: 13
Joined: Wed Jan 25, 2023 6:41 pm

Re: DrawBitmap() fails on Memory DC

Post by frenzy »

ah ok
juste added "unsigned char" for negatives values -> ok
thanks.

and is it possible to include from ressource.rc ? lapini IMAGE "01.bmp" ....
............
frenzy
Earned a small fee
Earned a small fee
Posts: 13
Joined: Wed Jan 25, 2023 6:41 pm

Re: DrawBitmap() fails on Memory DC

Post by frenzy »

thank you, I hadn't seen your answer regarding "unsigned char" but I found anyway, but with windres ( --use-temp-file -i ) and resource.rc .....
how can this be done?
User avatar
doublemax
Moderator
Moderator
Posts: 19158
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: DrawBitmap() fails on Memory DC

Post by doublemax »

You were asking for cross-platform solutions. The "include" method is the only one that works everywhere.

Resource files are WIndows only.
Use the source, Luke!
Post Reply