Click here to Skip to main content
15,886,873 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionFast Furie Transform Pin
bulgaa3-Jun-06 17:04
bulgaa3-Jun-06 17:04 
AnswerRe: Fast Furie Transform Pin
Cedric Moonen3-Jun-06 22:32
Cedric Moonen3-Jun-06 22:32 
QuestionC# Resizing a form the programming way. Pin
Hengy3-Jun-06 16:24
Hengy3-Jun-06 16:24 
AnswerRe: C# Resizing a form the programming way. Pin
Gary R. Wheeler3-Jun-06 16:34
Gary R. Wheeler3-Jun-06 16:34 
QuestionSkinning an application [modified] Pin
jlox3-Jun-06 14:02
jlox3-Jun-06 14:02 
AnswerRe: Skinning an application [modified] Pin
Hamid_RT4-Jun-06 0:51
Hamid_RT4-Jun-06 0:51 
QuestionMemDC bug? Pin
Jim Crafton3-Jun-06 12:25
Jim Crafton3-Jun-06 12:25 
AnswerRe: MemDC bug? [modified] Pin
bob169723-Jun-06 13:43
bob169723-Jun-06 13:43 
I would expect this is probably by design since RGBQUAD has the same ordering (assuming the reserved byte is alpha in RGBQUAD) as the GDI+ Color object. I would also suspect that your Red and Blue components are switched since GDI uses COLORREF.

I like to embed my ARGB Color objects into COLORREF structures so I can easily serialize them with CArchive. However, I must be careful as the Red and Blue are switched so I can't use them directly in GDI calls without bit shifting them around. The alpha always gets lost if I use the RGB macros on them so I'm guessing the GDI calls for LineTo, Rectangle, Ellipse use those macros internally which should strip off any alpha that was inserted in the structure.

I'm curious to see if your Red and blue are switched as this would further confirm my suspicion. If not, my theory is bust methinks.

For what it's worth

-- modified at 20:42 Saturday 3rd June, 2006

Oops. I got myself mixed up. Scratch what I said about the MACROS as that didn't quite make any sense now that I reread it while reading your reply. The alpha gets removed using

COLORREF colorRGB=colorARGB.ToCOLORREF();
instead of
COLORREF colorRGB=Color::MakeARGB(255,255,0,0);

I need to get some sleepBlush | :O

One thing that catches my attention is the alpha value. I'm used to 0xFF being completely opaque while 0x00 being transparent.
GeneralRe: MemDC bug? Pin
Jim Crafton3-Jun-06 13:47
Jim Crafton3-Jun-06 13:47 
QuestionTutorial About WinFX Pin
Muhammad Chitrali3-Jun-06 9:39
Muhammad Chitrali3-Jun-06 9:39 
AnswerRe: Tutorial About WinFX Pin
Hamid_RT4-Jun-06 0:55
Hamid_RT4-Jun-06 0:55 
QuestionError in alpha blending Pin
Luksky3-Jun-06 9:14
Luksky3-Jun-06 9:14 
AnswerRe: Error in alpha blending Pin
Jim Crafton3-Jun-06 13:49
Jim Crafton3-Jun-06 13:49 
AnswerRe: Error in alpha blending Pin
Hamid_RT4-Jun-06 0:53
Hamid_RT4-Jun-06 0:53 
GeneralRe: Error in alpha blending Pin
Luksky4-Jun-06 3:34
Luksky4-Jun-06 3:34 
QuestionUsing OSK.EXE inside W2K or XP Pin
jumbojetjames3-Jun-06 8:25
jumbojetjames3-Jun-06 8:25 
Questionwhy c++/mfc Pin
Muhammad Chitrali3-Jun-06 8:07
Muhammad Chitrali3-Jun-06 8:07 
AnswerRe: why c++/mfc Pin
bob169723-Jun-06 9:03
bob169723-Jun-06 9:03 
AnswerRe: why c++/mfc Pin
Rick York3-Jun-06 9:33
mveRick York3-Jun-06 9:33 
GeneralRe: why c++/mfc Pin
Trollslayer4-Jun-06 9:30
mentorTrollslayer4-Jun-06 9:30 
AnswerRe: why c++/mfc Pin
George L. Jackson3-Jun-06 10:00
George L. Jackson3-Jun-06 10:00 
QuestionHow to redefine HEX symbols Pin
tbrake3-Jun-06 7:56
tbrake3-Jun-06 7:56 
AnswerRe: How to redefine HEX symbols Pin
bob169723-Jun-06 8:47
bob169723-Jun-06 8:47 
GeneralRe: How to redefine HEX symbols Pin
tbrake3-Jun-06 8:57
tbrake3-Jun-06 8:57 
GeneralRe: How to redefine HEX symbols Pin
bob169723-Jun-06 9:24
bob169723-Jun-06 9:24 

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.