Windows API Reference

WPARAM

The WPARAM type is a message parameter. Its exact size and meaning depend on the system architecture and the message being processed.

Definition

The WPARAM type is defined as follows:

#if defined(_WIN64)
    typedef unsigned long long     WPARAM;
#else
    typedef unsigned int           WPARAM;
#endif

Remarks

WPARAM is a parameter used in Windows messages. It is typically used to pass identifier, control, or notification information to a window procedure. The specific interpretation of a WPARAM value is dictated by the message code.

On 64-bit systems, WPARAM is a 64-bit unsigned integer, while on 32-bit systems, it is a 32-bit unsigned integer. This ensures that message parameters can efficiently convey data on the target architecture.

Common uses of WPARAM include:

See Also

LPARAM
Another message parameter type.
MSG
Structure containing message information.
Window Procedure
The callback function that processes messages sent to a window.