Click here to Skip to main content
15,893,814 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: modeless dialog WM_CLOSE - opinion Pin
Shog916-Feb-06 11:32
sitebuilderShog916-Feb-06 11:32 
GeneralRe: modeless dialog WM_CLOSE - opinion Pin
23_44416-Feb-06 11:49
23_44416-Feb-06 11:49 
GeneralRe: modeless dialog WM_CLOSE - opinion Pin
Shog916-Feb-06 12:25
sitebuilderShog916-Feb-06 12:25 
GeneralRe: modeless dialog WM_CLOSE - opinion Pin
23_44417-Feb-06 8:56
23_44417-Feb-06 8:56 
QuestionShades of a color Pin
DirA15-Feb-06 2:25
DirA15-Feb-06 2:25 
AnswerRe: Shades of a color Pin
Maximilien15-Feb-06 2:53
Maximilien15-Feb-06 2:53 
AnswerRe: Shades of a color Pin
Stephen Hewitt15-Feb-06 19:00
Stephen Hewitt15-Feb-06 19:00 
AnswerRe: Shades of a color Pin
Stephen Hewitt15-Feb-06 23:51
Stephen Hewitt15-Feb-06 23:51 
Here's code to make a better rainbow:
-------------------------------------

COLORREF Rainbow(int x)
{
enum
{
maximum = 255, // Range of x is from 0 to this value.
h1 = maximum/4,
h2 = maximum/2,
h3 = 3*maximum/4,
};

const double m = 255/h1;

BYTE red;
if ( x<=h1 )
{
red = 255;
}
else if (x>=h2)
{
red = 0;
}
else
{
red = static_cast<BYTE>(-m*x+510.0 + 0.5);
}

BYTE green;
if (x<h1)
{
green = static_cast<BYTE>(m*x + 0.5);
}
else if (x>h3)
{
green = static_cast<BYTE>(-m*x+1020.0 + 0.5);
}
else
{
green = 255;
}

BYTE blue;
if (x<=h2)
{
blue = 0;
}
else if (x>=h3)
{
blue =255;
}
else
{
blue = static_cast<BYTE>(m*x-510.0 + 0.5);
}

return RGB(red, green, blue);
}


Steve
GeneralRe: Shades of a color Pin
DirA25-Feb-06 2:59
DirA25-Feb-06 2:59 
GeneralRe: Shades of a color Pin
Stephen Hewitt25-Feb-06 4:09
Stephen Hewitt25-Feb-06 4:09 
QuestionMultiple instance like MS Word Pin
Anilkumar K V15-Feb-06 1:54
Anilkumar K V15-Feb-06 1:54 
AnswerRe: Multiple instance like MS Word Pin
David Crow15-Feb-06 3:47
David Crow15-Feb-06 3:47 
GeneralRe: Multiple instance like MS Word Pin
Anilkumar K V15-Feb-06 17:04
Anilkumar K V15-Feb-06 17:04 
GeneralRe: Multiple instance like MS Word Pin
ThatsAlok16-Feb-06 2:38
ThatsAlok16-Feb-06 2:38 
GeneralRe: Multiple instance like MS Word Pin
David Crow16-Feb-06 2:50
David Crow16-Feb-06 2:50 
AnswerRe: Multiple instance like MS Word Pin
Michael Dunn15-Feb-06 12:08
sitebuilderMichael Dunn15-Feb-06 12:08 
QuestionListing OUs in Active Directory Pin
CarpetPants15-Feb-06 1:37
CarpetPants15-Feb-06 1:37 
QuestionFlash Decompiler ... Is it possible ? Pin
llp00na15-Feb-06 1:26
llp00na15-Feb-06 1:26 
AnswerRe: Flash Decompiler ... Is it possible ? Pin
toxcct15-Feb-06 2:27
toxcct15-Feb-06 2:27 
GeneralRe: Flash Decompiler ... Is it possible ? Pin
llp00na15-Feb-06 3:29
llp00na15-Feb-06 3:29 
GeneralRe: Flash Decompiler ... Is it possible ? Pin
toxcct15-Feb-06 3:31
toxcct15-Feb-06 3:31 
GeneralRe: Flash Decompiler ... Is it possible ? Pin
llp00na15-Feb-06 4:10
llp00na15-Feb-06 4:10 
GeneralRe: Flash Decompiler ... Is it possible ? Pin
Chintoo72315-Feb-06 7:15
Chintoo72315-Feb-06 7:15 
QuestionPlay Movie from URL Pin
Anilkumar K V15-Feb-06 1:26
Anilkumar K V15-Feb-06 1:26 
Questionhow to diplay the contents of the file on the MFC window? Pin
Akkibaba15-Feb-06 0:37
Akkibaba15-Feb-06 0:37 

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.