Click here to Skip to main content
15,889,909 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
is it possible to define Colorref like this???

const COLORREF CYAN = RGB(0,245,255);

# define CYAN 4

In This Code It Will Not Be Take effect..But I can't get Able to Display The color in view...


Can u help Me ..how to Solve this...??
Posted

1 solution

Not sure I got you, anyway, you may do something like:
C++
enum 
{
  WHITE,
  CYAN,
  ...
  COLORS
};

COLORREF color[COLORS];

color[WHITE]=RGB(255,255,255);
color[CYAN]=RGB(0,254, 255);
...

:)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900