• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1161
  • Last Modified:

COLORREF convert to long

Hi,
Is there a way to convert COLORREF to long (and vice-versa) ??

thanks,
Igal.
0
igalb
Asked:
igalb
1 Solution
 
freewellCommented:
Use the casting operator,

COLORREF rgb1 = RGB(255,255,255);
long lData1 = (long)rgb1;
COLORREF rgb2 = (COLORREF)lData;

ASSERT(rgb1 == rgb2);
0
 
Roshan DavisCommented:
COLRREF is a "unsigned long" definition

typedef unsigned long       DWORD;
typedef DWORD   COLORREF;

Rosh :)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now