Programming Tips - What should I set an invalid HWND to?
Date: 2015oct27 OS: Windows Q. What should I set an invalid HWND to? A. Just use NULL because that is what CreateWindow() uses to return failure. You might think about using INVALID_HANDLE_VALUE since a HWND is a handle. But INVALID_HANDLE_VALUE is -1 and so is HWND_TOPMOST.