Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
Can your video handle 16, 256, 32768, 16777216, or more colors Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
15-Jan-03
Category
Multimedia
Language
Delphi 2.x
Views
83
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Lou Adler

Can your video handle 16, 256, 32768, 16777216, or more colors?

Answer:

You can use WIN API function GetDeviceCaps() to calculate the number of colors 
supported by the current video mode. To make it even easier to use, here's a 
function that will simply return the number of maximum simultaneous colors current 
video device can handle:

1   function GetColorsCount: integer;
2   var
3     h: hDC;
4   begin
5     Result := 0;
6     try
7       h := GetDC(0);
8       Result :=
9         1 shl
10        (
11        GetDeviceCaps(h, PLANES) *
12        GetDeviceCaps(h, BITSPIXEL)
13        );
14    finally
15      ReleaseDC(0, h);
16    end;
17  end;


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC