It is possible to use WindowHDC as ScreenHDC by passing a NULL HWND to its ctor and we still need to release the HDC allocated in this case in the dtor, so do _not_ check for HWND being valid there. This fixes a bad resource leak in wxWindow::GetDPI() when it's called for a window without a valid handle. Closes #22193. Closes #22194.