GET_X_LPARAM #744
-
Where are these function for accessing mouse coordinates? https://learn.microsoft.com/en-us/windows/win32/api/windowsx/nf-windowsx-get_x_lparam Would this function posted by Jimi on StackOverflow do the job? private static (int x, int y) PointFromLParam(IntPtr lParam)
{
return ((int)(lParam) & 0xFFFF, ((int)(lParam) >> 16) & 0xFFFF);
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It looks like |
Beta Was this translation helpful? Give feedback.
It looks like
GET_X_LPARAM
is a macro. Macros are a feature of the Windows SDK unique to the C/C++ consumers and are not available in the metadata, and thus won't generally be emitted by CsWin32.In such cases, manual translation from the C++ definition to C# as you suggest is the way to go.
I am not familiar with
GET_X_LPARAM
in particular, so I can't comment on the efficacy of yourPointFromLParam
method.