[idd] helper: correctly pump message and destroy window

This commit is contained in:
Quantum authored and Geoffrey McRae committed 2025-09-14 17:16:23 +10:00
1 parent 67e1574d20
commit 5c1d604a22
3 files changed
+33 -8

No files matched your search

+14 -1
View File
@@ -60,6 +60,9 @@ LRESULT CWindow::handleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_CREATE:
onCreate();
return 0;
case WM_NCDESTROY:
PostQuitMessage(0);
return 0;
default:
if (s_taskbarCreated && uMsg == s_taskbarCreated)
{
@@ -89,8 +92,18 @@ void CWindow::registerIcon()
DEBUG_ERROR_HR(GetLastError(), "Shell_NotifyIcon(NIM_ADD)");
}
CWindow::~CWindow()
void CWindow::destroy()
{
if (m_hwnd)
{
DestroyWindow(m_hwnd);
m_hwnd = NULL;
}
}
CWindow::~CWindow()
{
destroy();
}