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

- 11-16-2002Shadow12345what is the significance of low order and high order bits
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?

- 11-16-2002Ken Fitlike
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):Code:`typedef UINT_PTR WPARAM;`

typedef LONG_PTR LPARAM;

Code:`typedef UINT WPARAM;`

typedef LONG LPARAM;

edit: formatting