Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CWindowImpl::WindowProc

 

This static function implements the window procedure.


      static LRESULT CALLBACK WindowProc(
   HWND hWnd,
   UINT uMsg,
   WPARAM wParam,
   LPARAM lParam 
);

hWnd

[in] The handle to the window.

uMsg

[in] The message sent to the window.

wParam

[in] Additional message-specific information.

lParam

[in] Additional message-specific information.

The result of the message processing.

WindowProc uses the default message map (declared with BEGIN_MSG_MAP) to direct messages to the appropriate handlers. If necessary, WindowProc calls DefWindowProc for additional message processing. If the final message is not handled, WindowProc does the following:

  • Performs unsubclassing if the window was unsubclassed.

  • Clears m_hWnd.

  • Calls OnFinalMessage before the window is destroyed.

You can override WindowProc to provide a different mechanism for handling messages.

Requirements

Header: atlwin.h

Show: