I couldn't be very accurate with the title of my question, because I don't know how this thing is really called.
I keep seeing how the Win32 API stores more then 1 value in a variable.
For example, WPARAM
and LPARAM
. it's a long
number that is "divided" to two: high word and low word.
There are many more examples when it takes 32bit value, divides it to 2 and sets it to two 16 bit values.
How can I set a variable myself this way? (create a variable, and divide the bits to how many I need, and set each part)
P.S. I'm asking mainly for educational purposes, so even if you wouldn't recommend me to do this myself, I would still appreciate an answer. Thanks.