Member Avatar for GreenDay2001

here's a piece of window procedure. What does DefWindowProc do in this program.

LRESULT CALLBACK WndProcedure(HWND hWnd, UINT Msg,
               WPARAM wParam, LPARAM lParam)
{
    switch(Msg)
    {
    case WM_DESTROY:
        // user wants to exit
        PostQuitMessage(WM_QUIT);
        break;
    default:
        // Hand off unprocessed messages to DefWindowProc
        return [B]DefWindowProc(hWnd, Msg, wParam, lParam)[/B];
    }
    
    return 0;
}

Recommended Answers

All 2 Replies

read this tutorial

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.