Click here to Skip to main content
16,007,843 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDo i actually need a DocTemplate? Pin
foobat28-Nov-01 17:32
foobat28-Nov-01 17:32 
AnswerRe: Do i actually need a DocTemplate? Pin
Chambers29-Nov-01 8:28
Chambers29-Nov-01 8:28 
QuestionHas anyone had DevStudio lock up when stepping but not when running a prog? Pin
foobat28-Nov-01 16:37
foobat28-Nov-01 16:37 
AnswerRe: Has anyone had DevStudio lock up when stepping but not when running a prog? Pin
Mike Nordell28-Nov-01 16:53
Mike Nordell28-Nov-01 16:53 
GeneralRe: Has anyone had DevStudio lock up when stepping but not when running a prog? Pin
foobat28-Nov-01 17:05
foobat28-Nov-01 17:05 
AnswerRe: Try to use TRACE macro Pin
Masaaki Onishi28-Nov-01 17:21
Masaaki Onishi28-Nov-01 17:21 
GeneralRe: Try to use TRACE macro Pin
foobat28-Nov-01 17:37
foobat28-Nov-01 17:37 
GeneralColour to Grayscale Pin
PJ Arends28-Nov-01 15:53
professionalPJ Arends28-Nov-01 15:53 
I am currently using this algorithm to convert a small image on a button from colour to grayscale:
COLORREF background = ::GetSysColor(COLOR_3DFACE);
for(int x = 0; x < width; x++)
    for(int y = 0; y < height; y++)
    {
        COLORREF clr = DC.GetPixel(x, y);
        if (clr != background)
        {
            int grayscale = (((GetBValue(clr) * 11) + (GetGValue(clr) * 59) + (GetRValue(clr) * 30)) / 100);
            DC.SetPixelV(x, y, RGB(grayscale, grayscale, grayscale));
        }
    }

Does anyone know of a better algorithmConfused | :confused:

---
It may be that your sole purpose in life is simply to serve as a warning to others.
GeneralRe: Colour to Grayscale Pin
Christian Graus28-Nov-01 16:33
protectorChristian Graus28-Nov-01 16:33 
GeneralRe: Colour to Grayscale Pin
Mike Nordell28-Nov-01 17:04
Mike Nordell28-Nov-01 17:04 
GeneralOpening Read-Only Access Files in Code Pin
John Clump28-Nov-01 14:42
John Clump28-Nov-01 14:42 
GeneralRe: Opening Read-Only Access Files in Code Pin
Nish Nishant28-Nov-01 16:23
sitebuilderNish Nishant28-Nov-01 16:23 
GeneralRe: Opening Read-Only Access Files in Code Pin
Mike Nordell28-Nov-01 17:10
Mike Nordell28-Nov-01 17:10 
GeneralRe: Opening Read-Only Access Files in Code Pin
29-Nov-01 8:56
suss29-Nov-01 8:56 
QuestionDialog bar with WTL ? Pin
28-Nov-01 14:32
suss28-Nov-01 14:32 
GeneralUsing #pragma for byte-alignment Pin
john john mackey28-Nov-01 12:54
john john mackey28-Nov-01 12:54 
GeneralRe: Using #pragma for byte-alignment Pin
Todd Smith28-Nov-01 13:24
Todd Smith28-Nov-01 13:24 
GeneralCDialog Pin
Stanislav28-Nov-01 12:43
Stanislav28-Nov-01 12:43 
GeneralRe: CDialog Pin
Nish Nishant28-Nov-01 14:49
sitebuilderNish Nishant28-Nov-01 14:49 
GeneralRe: Many ways to do this! Pin
Masaaki Onishi28-Nov-01 15:19
Masaaki Onishi28-Nov-01 15:19 
GeneralRe: CDialog Pin
Stanislav29-Nov-01 7:06
Stanislav29-Nov-01 7:06 
GeneralActiveX & Threads...gettin' Funky - Check this Out. Pin
Tim Rymer28-Nov-01 11:10
Tim Rymer28-Nov-01 11:10 
GeneralIs this is a valid Pin
28-Nov-01 10:55
suss28-Nov-01 10:55 
GeneralRe: Is this is a valid Pin
Michael Dunn28-Nov-01 13:56
sitebuilderMichael Dunn28-Nov-01 13:56 
GeneralRe: Is this is a valid Pin
Mike Nordell28-Nov-01 17:25
Mike Nordell28-Nov-01 17:25 

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.