unfortunately I have no idea why colouring stops working. Apparently the hotkeys are triggered, logs are written and CtlColors.Change() is called. The garbled tooltips are an additional mystery.
You might try to call the UpdateWindow() function directly after each call of InvalidateRect().
The function sends a WM_PAINT message directly to the window procedure of the specified window, bypassing the application queue.
Code: Select all
... DllCall("User32.dll\InvalidateRect", "Ptr", HWND, "Ptr", 0, "Int", 1) DllCall("User32.dll\UpdateWindow", "Ptr", HWND) ; <--- added ...