From 839151eaaad24771892afaae6bac690e31e58384 Mon Sep 17 00:00:00 2001 From: Igor Pavlov <87184205+ip7z@users.noreply.github.com> Date: Thu, 12 Feb 2026 00:00:00 +0000 Subject: 26.00 --- CPP/Windows/Control/ComboBox.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CPP/Windows/Control/ComboBox.cpp') diff --git a/CPP/Windows/Control/ComboBox.cpp b/CPP/Windows/Control/ComboBox.cpp index 8da487d..2e9c8cb 100644 --- a/CPP/Windows/Control/ComboBox.cpp +++ b/CPP/Windows/Control/ComboBox.cpp @@ -63,4 +63,13 @@ LRESULT CComboBox::GetLBText(int index, UString &s) } #endif +LRESULT CComboBox::AddString_SetItemData(LPCWSTR s, LPARAM lParam) +{ + const LRESULT index = AddString(s); + // NOTE: SetItemData((int)-1, lParam) works as unexpected. + if (index >= 0) // optional check, because (index < 0) is not expected for normal inputs + SetItemData((int)index, lParam); + return index; +} + }} -- cgit v1.2.3-55-g6feb