what is the significance of low order and high order bits. doesn't the WPARAM parameter of the wndproc equal the high order bits, and the LPARAM equal the low order bits?
Printable View
what is the significance of low order and high order bits. doesn't the WPARAM parameter of the wndproc equal the high order bits, and the LPARAM equal the low order bits?
When you are talking about 'bits', i'll assume you mean 'WORD's'.
It's for backward compatibility/is a legacy from 16 bit architectures. Look up the macro definitions for HIWORD, LOWORD,HIBYTE and LOBYTE to see how they chop WPARAM's and LPARAM's (32 bit values) and WORD's(16 bit values) into smaller chunks.
From windef.h (aug2001psdk):or simpler from a previous version of windef.h:Code:typedef UINT_PTR WPARAM;
typedef LONG_PTR LPARAM;
ie WPARAM and LPARAM are defined as 32 bit values (or 64 bit on 64 bit machines when 'ULONG_PTR' is used).Code:typedef UINT WPARAM;
typedef LONG LPARAM;
edit: formatting