C Board  

Go Back   C Board > Platform Specific Boards > Windows Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 11-16-2002, 10:16 AM   #1
Shadow12345
Guest
 
Posts: n/a
what 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?
  Reply With Quote
Old 11-16-2002, 11:46 AM   #2
erstwhile
 
Join Date: Jan 2002
Posts: 2,223
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;
or simpler from a previous version of windef.h:
Code:
typedef UINT WPARAM;
typedef LONG LPARAM;
ie WPARAM and LPARAM are defined as 32 bit values (or 64 bit on 64 bit machines when 'ULONG_PTR' is used).

edit: formatting
__________________
CProgramming FAQ
Caution: this person may be a carrier of the misinformation virus.
Ken Fitlike is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
sorting using pointer to pointer not working eager2no C Programming 17 09-21-2008 12:52 AM
[Tutorial] Implementing the Advanced Encryption Standard KONI C Programming 16 11-23-2007 01:48 PM
temperature sensors danko C Programming 22 07-10-2007 07:26 PM


All times are GMT -6. The time now is 05:48 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22