WM_CLOSE Notification

The WM_CLOSE message is sent as a signal that a window or an application should terminate.

A window receives this message through its WindowProc function.

Syntax

WM_CLOSE

    WPARAM wParam
    LPARAM lParam;

Parameters

wParam
This parameter is not used.
lParam
This parameter is not used.

Return Value

If an application processes this message, it should return zero.

Remarks

An application can prompt the user for confirmation, prior to destroying a window, by processing the WM_CLOSE message and calling the DestroyWindow function only if the user confirms the choice.

By default, the DefWindowProc function calls the DestroyWindow function to destroy the window.

Notification Requirements

Minimum DLL Version None
HeaderDeclared in Winuser.h, include Windows.h
Minimum operating systems Windows 95, Windows NT 3.1

See Also

Tags :


Community Content

Guru at GurusViews
Value

VB:

WM_CLOSE = &H10

C#

WM_CLOSE = 0x0010
Tags : value constant

Page view tracker