Click here to Skip to main content
15,885,216 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Ugly Numbers Error Pin
anollipian31-Oct-09 14:44
anollipian31-Oct-09 14:44 
GeneralRe: Ugly Numbers Error Pin
Luc Pattyn1-Nov-09 3:59
sitebuilderLuc Pattyn1-Nov-09 3:59 
QuestionRe: Ugly Numbers Error Pin
David Crow31-Oct-09 16:26
David Crow31-Oct-09 16:26 
Question2 Errors Pin
MrMcIntyre31-Oct-09 6:09
MrMcIntyre31-Oct-09 6:09 
AnswerRe: 2 Errors Pin
Chris Losinger31-Oct-09 6:10
professionalChris Losinger31-Oct-09 6:10 
AnswerRe: 2 Errors Pin
enhzflep31-Oct-09 6:17
enhzflep31-Oct-09 6:17 
GeneralRe: 2 Errors Pin
MrMcIntyre31-Oct-09 6:25
MrMcIntyre31-Oct-09 6:25 
GeneralRe: 2 Errors Pin
enhzflep31-Oct-09 6:36
enhzflep31-Oct-09 6:36 
Sure thing.

There's actually another one that neither of us mentioned yet too - you mean WM_DESTROY, not WM_DESTORY

Substitute part of your code for this:

    while (1)
    {
        if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
        {
            if (msg.message == WM_QUIT)
                TranslateMessage(&msg);
            DispatchMessage(&msg);
        }
    }
    return (int) msg.wParam;
}
//Callback Function (WindowEvent)
LRESULT CALLBACK WindowEvent(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message)
    {
        case WM_DESTROY:
            PostQuitMessage(0);
            return 0;
        break;
    }
    return DefWindowProc(hWnd, message, wParam, lParam);
}


There's other things amiss too, though this will give you a window that opens.
GeneralRe: 2 Errors Pin
MrMcIntyre31-Oct-09 6:40
MrMcIntyre31-Oct-09 6:40 
AnswerRe: 2 Errors Pin
David Crow31-Oct-09 16:33
David Crow31-Oct-09 16:33 
QuestionFunctional Parameters Pin
Paul Belikian31-Oct-09 3:59
Paul Belikian31-Oct-09 3:59 
AnswerRe: Functional Parameters Pin
Randor 31-Oct-09 4:08
professional Randor 31-Oct-09 4:08 
GeneralRe: Functional Parameters Pin
Paul Belikian31-Oct-09 4:20
Paul Belikian31-Oct-09 4:20 
AnswerRe: Functional Parameters Pin
Richard MacCutchan31-Oct-09 4:11
mveRichard MacCutchan31-Oct-09 4:11 
GeneralRe: Functional Parameters Pin
Paul Belikian31-Oct-09 4:21
Paul Belikian31-Oct-09 4:21 
QuestionHow to find unallocated sector in a disk programaticaaly Pin
Shiv Murti Pal31-Oct-09 2:24
Shiv Murti Pal31-Oct-09 2:24 
AnswerRe: How to find unallocated sector in a disk programaticaaly Pin
enhzflep31-Oct-09 3:40
enhzflep31-Oct-09 3:40 
Joke[OT] Re: How to find unallocated sector in a disk programaticaaly Pin
David Crow31-Oct-09 16:35
David Crow31-Oct-09 16:35 
GeneralRe: [OT] Re: How to find unallocated sector in a disk programaticaaly Pin
enhzflep31-Oct-09 16:49
enhzflep31-Oct-09 16:49 
QuestionRe: How to find unallocated sector in a disk programaticaaly Pin
Randor 31-Oct-09 3:44
professional Randor 31-Oct-09 3:44 
QuestionRunning a process as Administrator in Vista, Windows 2008? Pin
Kushagra Tiwari31-Oct-09 1:05
Kushagra Tiwari31-Oct-09 1:05 
AnswerRe: Running a process as Administrator in Vista, Windows 2008? [modified] Pin
Randor 31-Oct-09 1:50
professional Randor 31-Oct-09 1:50 
GeneralRe: Running a process as Administrator in Vista, Windows 2008? Pin
Kushagra Tiwari31-Oct-09 2:11
Kushagra Tiwari31-Oct-09 2:11 
GeneralRe: Running a process as Administrator in Vista, Windows 2008? Pin
Randor 31-Oct-09 2:18
professional Randor 31-Oct-09 2:18 
GeneralRe: Running a process as Administrator in Vista, Windows 2008? Pin
Kushagra Tiwari31-Oct-09 2:22
Kushagra Tiwari31-Oct-09 2:22 

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.