Click here to Skip to main content
15,897,718 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: run msword or other registered files such as PDF files & etc. Pin
Christian Graus19-Oct-06 8:28
protectorChristian Graus19-Oct-06 8:28 
GeneralRe: run msword or other registered files such as PDF files & etc. Pin
asdf175319-Oct-06 8:35
asdf175319-Oct-06 8:35 
GeneralRe: run msword or other registered files such as PDF files & etc. Pin
David Crow19-Oct-06 8:38
David Crow19-Oct-06 8:38 
GeneralRe: run msword or other registered files such as PDF files & etc. Pin
asdf175319-Oct-06 8:48
asdf175319-Oct-06 8:48 
GeneralRe: run msword or other registered files such as PDF files & etc. Pin
alphaxz19-Oct-06 20:36
alphaxz19-Oct-06 20:36 
GeneralRe: run msword or other registered files such as PDF files & etc. Pin
Hamid_RT19-Oct-06 20:58
Hamid_RT19-Oct-06 20:58 
GeneralRe: run msword or other registered files such as PDF files & etc. Pin
Hamid_RT19-Oct-06 20:56
Hamid_RT19-Oct-06 20:56 
QuestionBitmap lighting Pin
Waldermort19-Oct-06 6:12
Waldermort19-Oct-06 6:12 
I have a bitmap image representing a button. I would like to use this same bitmap to represent different states of the button, in particular the default, mouseover and clicked states. Default is the bitmap as it is, but for the other two states I need to make the bitmap slightly lighter and darker. I am doing this by looping through the pixels and manipulating the RGB values.

To make it darker I use this simple formula
crPixel = RGB( 
GetRValue(crPixel) * 0.8, 
GetGValue(crPixel) * 0.8, 
GetBValue(crPixel) * 0.8 );

Multiplying by 0.8 gives the desired effect. But for a lighter bitmap, I try multiplying by 1.2 which doesn't work. The bitmap appears green rather than lighter. Does anybody know the correct formula for adding white to a pixel?
AnswerRe: Bitmap lighting Pin
Christian Graus19-Oct-06 6:20
protectorChristian Graus19-Oct-06 6:20 
GeneralRe: Bitmap lighting Pin
Waldermort19-Oct-06 6:35
Waldermort19-Oct-06 6:35 
GeneralRe: Bitmap lighting Pin
Christian Graus19-Oct-06 7:18
protectorChristian Graus19-Oct-06 7:18 
AnswerRe: Bitmap lighting Pin
Mark Salsbery19-Oct-06 6:26
Mark Salsbery19-Oct-06 6:26 
GeneralRe: Bitmap lighting Pin
Waldermort19-Oct-06 6:31
Waldermort19-Oct-06 6:31 
AnswerRe: Bitmap lighting Pin
Maximilien19-Oct-06 6:46
Maximilien19-Oct-06 6:46 
AnswerRe: Bitmap lighting Pin
Jörgen Sigvardsson19-Oct-06 10:11
Jörgen Sigvardsson19-Oct-06 10:11 
GeneralRe: Bitmap lighting Pin
Waldermort19-Oct-06 17:49
Waldermort19-Oct-06 17:49 
GeneralRe: Bitmap lighting Pin
Jörgen Sigvardsson19-Oct-06 21:07
Jörgen Sigvardsson19-Oct-06 21:07 
QuestionILLEGAL INDIRECTION - HOW CAN IT BE RESOLVED? Pin
sahoong19-Oct-06 6:10
sahoong19-Oct-06 6:10 
AnswerRe: ILLEGAL INDIRECTION - HOW CAN IT BE RESOLVED? Pin
Maximilien19-Oct-06 6:49
Maximilien19-Oct-06 6:49 
GeneralRe: ILLEGAL INDIRECTION - HOW CAN IT BE RESOLVED? Pin
sahoong19-Oct-06 8:08
sahoong19-Oct-06 8:08 
GeneralRe: ILLEGAL INDIRECTION - HOW CAN IT BE RESOLVED? Pin
Maximilien19-Oct-06 8:18
Maximilien19-Oct-06 8:18 
GeneralRe: ILLEGAL INDIRECTION - HOW CAN IT BE RESOLVED? Pin
sahoong19-Oct-06 8:35
sahoong19-Oct-06 8:35 
GeneralRe: ILLEGAL INDIRECTION - HOW CAN IT BE RESOLVED? Pin
David Crow19-Oct-06 8:40
David Crow19-Oct-06 8:40 
GeneralRe: ILLEGAL INDIRECTION - HOW CAN IT BE RESOLVED? Pin
sahoong24-Oct-06 10:08
sahoong24-Oct-06 10:08 
GeneralRe: ILLEGAL INDIRECTION - HOW CAN IT BE RESOLVED? Pin
David Crow24-Oct-06 10:43
David Crow24-Oct-06 10:43 

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.