Solved

palette-info

Posted on 1997-03-26
14
308 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
14 Comments
 
LVL 2

Expert Comment

by:javiertb
ID: 1334971
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
ID: 1334972
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
ID: 1334973
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 2

Expert Comment

by:gysbert1
ID: 1334974
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
ID: 1334975

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
ID: 1334976
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
ID: 1334977

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
 
LVL 3

Accepted Solution

by:
mheacock earned 150 total points
ID: 1334978
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
ID: 1334979
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
ID: 1334980
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
ID: 1334981
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
ID: 1334982
Never mind...
0
 
LVL 3

Expert Comment

by:mheacock
ID: 1334983
Whatever.
0
 
LVL 3

Expert Comment

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

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month5 days, 21 hours left to enroll

626 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