Solved

palette-info

Posted on 1997-03-26
14
301 Views
Last Modified: 2010-04-06
I'd like to have info on handling (logical) palettes in the Windows-environment. My Delphi-package came with the 21-day course which says very little about this. I'd like to know how to use CreatePalette, RealizePalette etc. and the difference between Delphi's PaletteRGB and RGB.
0
Comment
Question by:remcodek
14 Comments
 
LVL 2

Expert Comment

by:javiertb
Comment Utility
You should take a look at the help files that come with Delphi for these palette functions. And I also suggest you to take a look at the following files (examples using palette functions):
- DIBDemo2.zip in DSP
- www.tempest-sw.com/freeware/Delphi/pal10.zip

Hope this helps
0
 

Author Comment

by:remcodek
Comment Utility
Imagine: I looked in Delphi's help-files!
They helped me no further. The Windows-help-files gave me some more info but not enough to work on. I fooled around a bit with some of the functions but with very little succes.

As for background: I'm used to do palette-stuff in a DOS-environment, which gives you clear and simple acces to the full palette.
0
 
LVL 3

Expert Comment

by:mheacock
Comment Utility
I can give you answer later...but for now...consider this...

Paletting is already becoming a thing of the past.  4MB
video cards are dirt-cheap now.  If you are designing a game,
state a requirement of TRUE COLOUR.  There are very few games
on the market, nowadays, that are written for the lowest common
denominator.

Palettes are a true pain in the ass.  If you can afford it,
and you think it won't affect the overall distribution of
you application, I'd suggest just doing everything in TRUE
COLOUR and avoiding the entire paletting mess.

But if you REALLY REALLY want palette tips, then I suppose I
can try and give you a few.  But be warned...paletting is
a real pain in the butt and many frustrating sessions will
be spent debugging.
0
 
LVL 2

Expert Comment

by:gysbert1
Comment Utility
Listen to mheacocks's advice !!

Palettes are much more complicated in windows than in dos !!

In dos you are running a single app with a single palette. In windows all apps share the same colorspace and palettes are synchronized to use the same colors, etc. to get maximum efectiveness over all applications. This complicates both the implementation and handling of palettes in windows as opposed to dos.
0
 

Author Comment

by:remcodek
Comment Utility

I ask the way to the Tower Bridge and all I get as a reply is "Don't go there."
Why do you think I ask this question?

To be a bit more specific: I'm used to doing programs in DOS fiddling with palettes all the time, I've written a few Windows-applications some in truecolor some with a single palette but now I'm faced with the fact that I need to write a program that has to be able to run on systems with only 256 colors.
(Don't ask me why, let's just say there are a lot of users that can't afford to buy new equipment every two or three years).

Tell me it's impossible and I'll stop my search, but saying it's too difficult is not enough.
I've struggled through the Win32-help-docs but they tell me lots of stuff but don't give ANY example as to how to use that information.

By the way, can anyone tell me: does it actually make sense trying to program in 256 colors (in Windows that is)?

Thanks anyway!

Remco de Korte
0
 
LVL 3

Expert Comment

by:mheacock
Comment Utility
I didn't say "Don't go there"...but I do suggest avoiding the
Tower Bridge if you can.

A couple of years ago, you had to program for 256 colours...
True Colour video cards that supported the higher resolutions
were expensive...now they are cheap...very few package systems
are being offered with video cards that do not support true
colour at 1024x756 (or higher).

So, nowadays, it does not make sense to program in 256 colour.
But if you have to you have to, therefore I will try and dredge
up some examples for you over the next few days.
0
 

Author Comment

by:remcodek
Comment Utility

Okay, thanks (in advance).

I understand truecolor is the standard now.
That's also part of the problem. I have to reset my display everytime I want to testrun a program in 256 colors.
Still, also for web-pages 256-color seem to be recommended.
Also, I found that several people buy brandnew systems that have a display  set at 256 colors (even though it supports hicolor) and don't have a clue about this or changing it.

But, again, if you could dig up some (not too complicated) examples with Createpalette and the likes (maybe some info on DC's - I'm not too familiar with that concept either) I'd be grateful.
I know it might be asking a bit much and I didn't want to seem ingrateful with my Tower Bridge, it's just that this problem is really nagging me. (I'll add some points as a bonus, that should make up for it)

Bye,

Remco
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 3

Accepted Solution

by:
mheacock earned 150 total points
Comment Utility
I'm not going to paste a whole lot of code here, but if you want me to send you a sample Delphi 1.0 application that demonstrates Palette animation, I can send it to you.

And for those people that are reading this as a PAQ...so you don't feel cheated for having just spent 15 points, you can mail me too and ask for the code.

My e-mail is:  cerebus@islandnet.com
0
 
LVL 3

Expert Comment

by:mheacock
Comment Utility
Did this help?  If you could grade this it would be appreciated.  Thanks.  If you need further assistance, just add a comment and I will answer shortly.  I don't think you've mailed me for the app.
0
 

Author Comment

by:remcodek
Comment Utility
It's rather difficult to grade an answer I have yet to get but I'll leave it at this as this is obviously such a difficult question (?).
I guess I'll figure it out myself from the examples I can collect but I was hoping there would be someone here that could provide me with some theory-to-practice information on palettes.

Please send me the examples (eventhough I use Delphi20 - it must be ok (?)) and thanks for your efforts.

Remco
0
 
LVL 3

Expert Comment

by:mheacock
Comment Utility
You didn't have to grade until you got the examples...I mainly wanted to know if you wanted the examples...I need you to mail me, so that I can send you the examples...they will work in Delphi 1.0.  My e-mail address is above.
0
 

Author Comment

by:remcodek
Comment Utility
Never mind...
0
 
LVL 3

Expert Comment

by:mheacock
Comment Utility
Whatever.
0
 
LVL 3

Expert Comment

by:mheacock
Comment Utility
The examples was stuff I got off the net last summer, so you probably found the examples yourself.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now