Hi,
I'm trying to write C# code that responds to the WM_TABLET_FLICK messages in a WinForm app. I override the WndProc. I can see the WM_TABLET_FLICK messages. But when I attempt to get the FLICK_POINT struct from the LParam, I'm getting an Access Violation - attempted to read or write protected memory.
I'm using FLICK_POINT flkPoint = (FLICK_POINT)msg.GetLParam(typeof(FLICK_POINT));
I've got FLICK_POINT struct defined as:
[StructLayout(LayoutKind.Sequential)]
public struct FLICK_POINT
{
public Int16 x;
public Int16 y;
}
I'm running this on HP TouchSmart tx2 tablet PC with Vista 32bit.
Anyone have similar problems with this? Any thoughts/suggestions would be appreciated?
Thanks
RSS


I found the answer. Even though LParam in the WndProc Message is an IntPtr, it is not really a pointer. It is the actual value. All I need to do is get the hi word for the y value and the lo word for the x value and it works correctly.
That certainly was nonobvious. All the flick docs that I read did not indicate this.