Click here to Skip to main content
15,909,030 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Dumb Question. But Can't find an answer Pin
FISH7865-Mar-09 9:09
FISH7865-Mar-09 9:09 
GeneralRe: Dumb Question. But Can't find an answer Pin
Yusuf5-Mar-09 9:19
Yusuf5-Mar-09 9:19 
GeneralRe: Dumb Question. But Can't find an answer Pin
FISH7865-Mar-09 9:24
FISH7865-Mar-09 9:24 
GeneralRe: Dumb Question. But Can't find an answer Pin
Code-o-mat5-Mar-09 9:22
Code-o-mat5-Mar-09 9:22 
GeneralRe: Dumb Question. But Can't find an answer Pin
FISH7865-Mar-09 9:47
FISH7865-Mar-09 9:47 
GeneralRe: Dumb Question. But Can't find an answer Pin
Code-o-mat5-Mar-09 10:14
Code-o-mat5-Mar-09 10:14 
GeneralRe: Dumb Question. But Can't find an answer Pin
FISH7865-Mar-09 16:52
FISH7865-Mar-09 16:52 
GeneralRe: Dumb Question. But Can't find an answer Pin
Code-o-mat5-Mar-09 22:03
Code-o-mat5-Mar-09 22:03 
I'm not sure what you mean but...getting the colorref from the RGB components isn't done by multiplying the components. COLORREF is a 4 byte value (a long is a 8 byte value if i recall correctly), the first byte of this value (the least significant i believe) represents the red component, the second one represents green and the trird one represents blue. (It might be the other way around, am not sure but the idea is basicly the same) So:

[1 Byre Red][1 Byte Green][1 Byte Blue][1 Byte unused]

If you have the 3 components, 1 byte each you can make a colorref of them like this:
Red | (Green << 8) | (Blue << 16)

You can read about this here[^] too, it probably explains it better than i do.

> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <

GeneralRe: Dumb Question. But Can't find an answer Pin
FISH7866-Mar-09 1:52
FISH7866-Mar-09 1:52 
GeneralRe: Dumb Question. But Can't find an answer Pin
Code-o-mat6-Mar-09 2:06
Code-o-mat6-Mar-09 2:06 
GeneralRe: Dumb Question. But Can't find an answer Pin
FISH7866-Mar-09 2:16
FISH7866-Mar-09 2:16 
GeneralRe: Dumb Question. But Can't find an answer Pin
Code-o-mat6-Mar-09 2:28
Code-o-mat6-Mar-09 2:28 
GeneralRe: Dumb Question. But Can't find an answer Pin
FISH7866-Mar-09 2:42
FISH7866-Mar-09 2:42 
GeneralRe: Dumb Question. But Can't find an answer Pin
Code-o-mat6-Mar-09 2:45
Code-o-mat6-Mar-09 2:45 
AnswerRe: Dumb Question. But Can't find an answer Pin
Jonnie White6-Mar-09 3:44
Jonnie White6-Mar-09 3:44 
QuestionWin32 Pin
sarathbabununna5-Mar-09 4:56
sarathbabununna5-Mar-09 4:56 
AnswerRe: Win32 Pin
Code-o-mat5-Mar-09 6:22
Code-o-mat5-Mar-09 6:22 
Questioncatching ctreectrl's WM_ERASEBKGND Pin
kitkat120125-Mar-09 4:44
kitkat120125-Mar-09 4:44 
AnswerRe: catching ctreectrl's WM_ERASEBKGND Pin
Code-o-mat5-Mar-09 5:14
Code-o-mat5-Mar-09 5:14 
GeneralRe: catching ctreectrl's WM_ERASEBKGND Pin
kitkat120125-Mar-09 5:54
kitkat120125-Mar-09 5:54 
GeneralRe: catching ctreectrl's WM_ERASEBKGND Pin
Code-o-mat5-Mar-09 5:57
Code-o-mat5-Mar-09 5:57 
GeneralRe: catching ctreectrl's WM_ERASEBKGND Pin
kitkat120125-Mar-09 6:04
kitkat120125-Mar-09 6:04 
GeneralRe: catching ctreectrl's WM_ERASEBKGND Pin
Code-o-mat5-Mar-09 6:11
Code-o-mat5-Mar-09 6:11 
QuestionCan I make a new view of my document DYNAMICALLY and of a different class than the old view? (SDI Doc/View) Pin
Joseph Marzbani5-Mar-09 3:44
Joseph Marzbani5-Mar-09 3:44 
AnswerRe: Can I make a new view of my document DYNAMICALLY and of a different class than the old view? (SDI Doc/View) Pin
led mike5-Mar-09 4:16
led mike5-Mar-09 4:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.