tags:

views:

801

answers:

1

When the WIN32 docs says something like:

wParam
    The low-order word specifies the edit control identifier.
    The high-order word specifies the notification message.

What's a nice way of building that wParam?

+1  A: 
public static ushort LowWord(uint val)
{
    return (ushort)val;
}

public static ushort HighWord(uint val)
{
   return (ushort)(val >> 16);
}

public static uint BuildWParam(ushort low, ushort high)
{
    return ((uint)high << 16) | (uint)low;
}
plinth
Ah - thanks. uint BuildWParam(ushort low, ushort high) { return ((uint)low << 16) | (uint)high; }
plinth