well the title kinda describes it.
I tried LOWORD(lParam) = somenum;
and it threw me an error saying that the left side valye has to be a 1-value
That's l-value, not 1-value (lowercase-L)
Read up on bitwise operators.
lParam &= ~0xFFFF;
lParam |= ( somenum & 0xFFFF );
LOWORD is a macro, used to extract the 'low word' from a long.
HIWORD extracts the 'high word'
There is another macro that can be used to put them back together:
LPARAM MAKELPARAM(
WORD wLow,
WORD wHigh
);
So a call like: MAKELPARAM(somenum, HIWORD(lParam))
would be pretty close to what you want.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.