protected void AttachWindowEventCallback(IntPtr hWinEventHook, WinEventHook.SWEH_Events eventType, IntPtr hWnd, WinEventHook.SWEH_ObjectId idObject, long idChild, uint dwEventThread, uint dwmsEventTime) { if (hWnd == _gameMemory.Process.WindowHandle && eventType == WinEventHook.SWEH_Events.EVENT_OBJECT_LOCATIONCHANGE && idObject == WinEventHook.SWEH_ObjectId.OBJID_WINDOW) { UpdateAttachWindowPosition(); } }
protected void MoveGameWindowEventCallback(IntPtr hWinEventHook, WinEventHook.SWEH_Events eventType, IntPtr hWnd, WinEventHook.SWEH_ObjectId idObject, long idChild, uint dwEventThread, uint dwmsEventTime) { if (hWnd == _gameMemory.Process.WindowHandle && eventType == WinEventHook.SWEH_Events.EVENT_OBJECT_LOCATIONCHANGE && idObject == WinEventHook.SWEH_ObjectId.OBJID_WINDOW) { _window?.FitTo(_gameMemory.Process.WindowHandle, true); } }