|
12.7 I need to encode the LParam argument of a mouse message. How do I do MakeLong , HiWord and LoWord type conversions?
|
You can create static methods that encode and decode these values. Here are some.
|
static int MakeLong(int LoWord, int HiWord)
|
return (HiWord << 16) | (LoWord & 0xffff);
|
static IntPtr MakeLParam(int LoWord, int HiWord)
|
return (IntPtr) ((HiWord << 16) | (LoWord & 0xffff));
|
static int HiWord(int Number)
|
return (Number >> 16) & 0xffff;
|
static int LoWord(int Number)
|
|
|
|