Loword () gets a 32-bit low 16-bit
Hiword () to get a 32-bit high 16-bit
Lobyte () gets the byte with the lowest 16 bits (rightmost)
Hibyte () gets the byte with the highest 16 bits (leftmost)
Loword and hiword are frequently used in the past. For example, the Message Parameter lparam stores the mouse position. lparam is 4 bytes. It stores X at the lower two and Y at the higher two. however, I have never understood lobyte or hibyte.
When lobyte and hibyte are applied to the number of 32 bits, they should be used in the last 16 bits of the number of 32 bits.
# Include <iostream> # include <windows. h> int main () {// I = 10241035 (0x009c440b) int I = 10241035; Word ih = hiword (I ); // take 16-bit high word IL = loword (I); // take 16-bit low // result: 9 CSTD: cout <STD :: hex <"I high:" <IH <STD: Endl; // result: 440 bstd: cout <STD :: hex <"I low position:" <IL <STD: Endl; Word bH = hibyte (I ); // obtain the high 8-bit word BL = lobyte (I); // take the low 8-bit word BL = lobyte (I); // result: 44 (Yes 44, not 0, I have always understood the error) STD :: cout <STD: Hex <"I high:" <BH <STD: Endl; // result: bstd: cout <STD :: hex <"I low position:" <BL <STD: Endl; return exit_success ;}