Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Palette Problems

1 view
Skip to first unread message

Mike Kock

unread,
Sep 28, 1994, 7:30:00 PM9/28/94
to
I hope someone can help me with a palette problem I am having. I'm
using Borland C++ 4.02. I have created some 256 color bitmaps in my
resource using Resource Workshop. But when I display the bitmaps, the
colors are always off. So, I created a logical palette in my app with
colors that have the same RGB values that are used in Workshop when I
created the bitmaps. I have selected it in and realized it, but the
colors are still off. I'm sure I am going about this the wrong way or
something. I would greatly appreciate it if someone could tell me what
I am doing wrong. THanks for any help.
---
ţ SLMR 2.1a ţ Features should be discovered, not documented.

Ed McCreary

unread,
Sep 29, 1994, 11:34:29 AM9/29/94
to

Remember that LoadBitmap won't work with 8-bit bitmaps. In will convert
them to 4-bit bitmaps when you load them. What you need to do is use
FindResource/LoadResource/LockResource to get it into memory.

Also, you can still decleare it as a BITMAP in your resource file. If
you do, the resource compiler will strip off the file header info for
you. If you use a custom resource type, you'll have to strip it off
yourself.


--
Eddie McCreary e...@twisto.compaq.com
Graphics Development "Do or do not, there is no 'try'."
In the event of my capture, Compaq will disavow any and all knowledge
of my operations. Of course I don't speak for them.

Mike Kock

unread,
Oct 3, 1994, 1:30:00 AM10/3/94
to
EM>Remember that LoadBitmap won't work with 8-bit bitmaps. In will convert
EM>them to 4-bit bitmaps when you load them. What you need to do is use
EM>FindResource/LoadResource/LockResource to get it into memory.

EM>Also, you can still decleare it as a BITMAP in your resource file. If
EM>you do, the resource compiler will strip off the file header info for
EM>you. If you use a custom resource type, you'll have to strip it off
EM>yourself.

Thanks for the info! I never knew any of this. I don't recall Petzold
ever mentioning that. Any suggestions for another good book on
Windows? This will help me out a lot. Thanks again!
---
ž SLMR 2.1a ž I don't believe in miracles, I rely on them.

Ed McCreary

unread,
Oct 5, 1994, 10:28:14 AM10/5/94
to

I've really gotten a log out of "Windows 3.1:A Developer's Guide" by
Jeffery Richter. He doesn't go much into graphics. Me mostly covers
dialog box techiques, custom controls, etc.

0 new messages