On Wed Sep 14 21:56:31 2022 +0000, Esme Povirk wrote:
Unsure what the best way to handle this is. AFAICT SendMessage will set the last error to ERROR_INVALID_WINDOW_HANDLE if the window doesn't exist, but it may not set the last error if it succeeds and returns 0. Thus you would either have to call IsWindow or set last error beforehand.
Ah, didn't know about doing `SetLastError`. I'll probably do that then, and then check if it's `ERROR_INVALID_WINDOW_HANDLE` after the call.