According to MSDN
The return value specifies the result of the message processing; it depends on the message sent.
I know it is defined as
typedef LONG_PTR LRESULT;
Meaning it will be 8 bytes on 64bit machine but it doesn’t!
Does anyone know if it is safe to assume that only the lower 4 bytes are used and store it as an INT (for example).
No it’s not safe, because the return value is defined by the message being sent and the handler.
If you control the handler and the message then it’d be possible, it’s not safe in the general case.
James