get HiByte [modifed]
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
Hi again :) In
windef.h
we can see these defines :#define LOBYTE(w) ((BYTE)((DWORD_PTR)(w) & 0xff))
#define HIBYTE(w) ((BYTE)((DWORD_PTR)(w) >> 8))I don't understand how HIBYTE gets, most significant byte, by above code. With LOBYTE all is clear. I thought these macros were getting bytes from 32 bit value. It found out they are for 16 bit values, now all is clear thanks. -- modified at 14:36 Friday 19th May, 2006