WindowProc

The WindowProc function is an application-defined function that processes messages sent to a window. The WNDPROC type defines a pointer to this callback function. WindowProc is a placeholder for the application-defined function name.

LRESULT CALLBACK WindowProc(
  HWND hwnd,      // handle to window
  UINT uMsg,      // message identifier
  WPARAM wParam,  // first message parameter
  LPARAM lParam   // second message parameter
);
 

Parameters

hwnd
Handle to the window.
uMsg
Specifies the message.
wParam
Specifies additional message information. The contents of this parameter depend on the value of the uMsg parameter.
lParam
Specifies additional message information. The contents of this parameter depend on the value of the uMsg parameter.

Return Values

The return value is the result of the message processing and depends on the message sent.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Requires version 1.0 or later.
  Header: Declared in winuser.h.
  Import Library: User-defined.

See Also

Window Procedures Overview, Window Procedure Functions, CallWindowProc, DefWindowProc, RegisterClass