Thread: Wm_close & Wm_destroy

  1. #1
    Registered User
    Join Date
    Jul 2002
    Posts
    85

    Wm_close & Wm_destroy

    What's the difference between them?

    here's a part of example in my tutorial :

    switch(msg)
    {
    case WM_CLOSE:
    DestroyWindow(hwnd);
    break;
    case WM_DESTROY:
    PostQuitMessage(0);
    break;
    default:
    return DefWindowProc(hwnd, msg, wParam, lParam);
    }

    can I change it to:

    switch(msg)
    {
    case WM_CLOSE:
    DestroyWindow(hwnd);
    PostQuitMessage(0);
    break;
    default:
    return DefWindowProc(hwnd, msg, wParam, lParam);
    }

  2. #2
    x4000 Ruski's Avatar
    Join Date
    Jun 2002
    Location
    Outer Space!
    Posts
    542
    I dont really know but I guess that WM_Close is closing it from the X button or Alt+F4 and the WM_Destroy could be from Ctrl+Alt+Delete or just Restart Or Shut-Down PC. But I dont really know.
    what does signature stand for?

Popular pages Recent additions subscribe to a feed