private void EnableMouseTracking() { TrackMouseEventStructure me = new TrackMouseEventStructure(); me.Size = TrackMouseEventStructure.SizeInBytes; me.TrackWindowHandle = child_window.WindowHandle; me.Flags = TrackMouseEventFlags.LEAVE; if (!Functions.TrackMouseEvent(ref me)) { Debug.Print("[Warning] Failed to enable mouse tracking, error: {0}.", Marshal.GetLastWin32Error()); } }
private void EnableMouseTracking() { TrackMouseEventStructure me = new TrackMouseEventStructure(); me.Size = TrackMouseEventStructure.SizeInBytes; me.TrackWindowHandle = child_window.Handle; me.Flags = TrackMouseEventFlags.LEAVE; if (!Functions.TrackMouseEvent(ref me)) Debug.Print("[Warning] Failed to enable mouse tracking, error: {0}.", Marshal.GetLastWin32Error()); }
public static extern bool TrackMouseEvent(ref TrackMouseEventStructure lpEventTrack);
public static extern BOOL TrackMouseEvent(ref TrackMouseEventStructure lpEventTrack);
void EnableMouseLeaveNotifications() { TrackMouseEventStructure tme = new TrackMouseEventStructure(); tme.Size = TrackMouseEventStructure.SizeInBytes; tme.Flags |= TrackMouseEventFlags.LEAVE; tme.TrackWindowHandle = child_window.WindowHandle; tme.HoverTime = -1; // HOVER_DEFAULT if (!Functions.TrackMouseEvent(ref tme)) Debug.Print("[Error] Failed to enable mouse event tracking. Error: {0}", Marshal.GetLastWin32Error()); }
public static bool TrackMouseEvent(ref TrackMouseEventStructure lpEventTrack);