Cast HWND to int for logging