Solved

COLORREF convert to long

Posted on 2003-12-08
2
1,098 Views
Last Modified: 2013-11-20
Hi,
Is there a way to convert COLORREF to long (and vice-versa) ??

thanks,
Igal.
0
Comment
Question by:igalb
2 Comments
 
LVL 3

Accepted Solution

by:
freewell earned 50 total points
ID: 9902277
Use the casting operator,

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

ASSERT(rgb1 == rgb2);
0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9902367
COLRREF is a "unsigned long" definition

typedef unsigned long       DWORD;
typedef DWORD   COLORREF;

Rosh :)
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
How to calculate times for developing software? 8 60
Detect CR LF to each line 12 137
MaxSpan challenge 9 67
canBalance challenge 34 65
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
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.

706 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

15 Experts available now in Live!

Get 1:1 Help Now