Click here to Skip to main content
16,008,010 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralProblem With std::getline And C++ Pin
valikac16-Dec-01 4:44
valikac16-Dec-01 4:44 
GeneralRe: Problem With std::getline And C++ Pin
Joaquín M López Muñoz16-Dec-01 10:45
Joaquín M López Muñoz16-Dec-01 10:45 
GeneralRe: Problem With std::getline And C++ Pin
valikac16-Dec-01 16:03
valikac16-Dec-01 16:03 
GeneralReading and Writing Data From ifstream to *STL Container* in *Binary* Pin
valikac16-Dec-01 4:35
valikac16-Dec-01 4:35 
GeneralRe: Reading and Writing Data From ifstream to *STL Container* in *Binary* Pin
Todd Smith16-Dec-01 4:46
Todd Smith16-Dec-01 4:46 
GeneralRe: Reading and Writing Data From ifstream to *STL Container* in *Binary* Pin
valikac16-Dec-01 5:05
valikac16-Dec-01 5:05 
GeneralColor Ramp Pin
Paul Selormey16-Dec-01 1:07
Paul Selormey16-Dec-01 1:07 
GeneralRe: Color Ramp Pin
PJ Arends16-Dec-01 9:37
professionalPJ Arends16-Dec-01 9:37 
This is what I use :

COLORREF *Gradient(COLORREF start, COLORREF end, int steps)
{
    if (steps < 2)
        return NULL;
    COLORREF *output = new COLORREF[steps];
    output[0] = start;
    output[steps - 1] = end;

    double sR = (double)GetRValue(start);
    double sB = (double)GetBValue(start);
    double sG = (double)GetGValue(start);

    double eR = (double)GetRValue(end);
    double eB = (double)GetBValue(end);
    double eG = (double)GetGValue(end);

    double RedStep = (eR - sR) / (double)steps;
    double BlueStep = (eB - sB) / (double)steps;
    double GreenStep = (eG - sG) / (double)steps;

    for (int x = 1; x < steps - 1; x++)
    {
        sR += RedStep;
        sB += BlueStep;
        sG += GreenStep;

        output[x] = RGB((BYTE)sR, (BYTE)sB, (BYTE)sG);
    }
    return output;
}


---
It may be that your sole purpose in life is simply to serve as a warning to others.
GeneralRe: Color Ramp Pin
Daniel Ferguson16-Dec-01 9:40
Daniel Ferguson16-Dec-01 9:40 
GeneralRe: Color Ramp Pin
Rick York16-Dec-01 10:27
mveRick York16-Dec-01 10:27 
GeneralRe: Color Ramp Pin
Serge Baltic16-Dec-01 21:56
Serge Baltic16-Dec-01 21:56 
GeneralRe: Color Ramp-Thanks Pin
Paul Selormey16-Dec-01 13:03
Paul Selormey16-Dec-01 13:03 
QuestionWhich ActiveX controls can i use? Pin
15-Dec-01 23:44
suss15-Dec-01 23:44 
QuestionAre there any News Groups for Linux newbies? Pin
BigMouth15-Dec-01 23:41
BigMouth15-Dec-01 23:41 
AnswerRe: Are there any News Groups for Linux newbies? Pin
Michael Dunn16-Dec-01 8:15
sitebuilderMichael Dunn16-Dec-01 8:15 
GeneralRe: Are there any News Groups for Linux newbies? Pin
BigMouth16-Dec-01 17:53
BigMouth16-Dec-01 17:53 
GeneralRe: Are there any News Groups for Linux newbies? Pin
markkuk17-Dec-01 20:14
markkuk17-Dec-01 20:14 
GeneralRe: Are there any News Groups for Linux newbies? Pin
BigMouth18-Dec-01 17:08
BigMouth18-Dec-01 17:08 
GeneralAnother Timezone problem Pin
Wolfram Steinke15-Dec-01 20:06
Wolfram Steinke15-Dec-01 20:06 
GeneralRe: Another Timezone problem Pin
Daniel Ferguson15-Dec-01 21:34
Daniel Ferguson15-Dec-01 21:34 
GeneralRe: Another Timezone problem Pin
Wolfram Steinke15-Dec-01 21:46
Wolfram Steinke15-Dec-01 21:46 
QuestionHoW dO i CrEaTe A dIreEcToRy? Pin
15-Dec-01 16:21
suss15-Dec-01 16:21 
AnswerRe: HoW dO i CrEaTe A dIreEcToRy? Pin
Rick York15-Dec-01 16:57
mveRick York15-Dec-01 16:57 
GeneralRe: HoW dO i CrEaTe A dIreEcToRy? Pin
16-Dec-01 8:22
suss16-Dec-01 8:22 
GeneralRe: how do I create a directory? Pin
Rick York16-Dec-01 8:53
mveRick York16-Dec-01 8:53 

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.