[idd] helper: detect mode listbox selection change

This commit is contained in:
Quantum
2025-10-04 03:01:27 -04:00
committed by Geoffrey McRae
parent e082acbe44
commit 1d7cb35de8
4 changed files with 24 additions and 0 deletions

View File

@@ -74,6 +74,8 @@ LRESULT CConfigWindow::handleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
RedrawWindow(m_hwnd, NULL, NULL, RDW_ERASE | RDW_INVALIDATE | RDW_ALLCHILDREN);
return 0;
}
case WM_COMMAND:
return onCommand(LOWORD(wParam), HIWORD(wParam), (HWND)lParam);
default:
return CWindow::handleMessage(uMsg, wParam, lParam);
}
@@ -113,3 +115,12 @@ LRESULT CConfigWindow::onResize(DWORD width, DWORD height)
pos.pinLeftTopBottom(*m_modeBox, 24, 64, 176, 24);
return 0;
}
LRESULT CConfigWindow::onCommand(WORD id, WORD code, HWND hwnd)
{
if (hwnd == *m_modeBox && code == LBN_SELCHANGE && m_modes)
{
DEBUG_INFO(L"Selection changed to: %s", (*m_modes)[m_modeBox->getSelData()].toString().c_str());
}
return 0;
}