Define the struct you want, for example RECT
struct RECT
{
public int left, top, right, bottom;
}
Then use the Message.GetLPAram method
RECT rc = (RECT)m.GetLParam( typeof(RECT) );