diff options
| author | Igor Pavlov <87184205+ip7z@users.noreply.github.com> | 2026-02-12 00:00:00 +0000 |
|---|---|---|
| committer | Igor Pavlov <87184205+ip7z@users.noreply.github.com> | 2026-02-12 17:38:49 +0500 |
| commit | 839151eaaad24771892afaae6bac690e31e58384 (patch) | |
| tree | e292449d621f7a1d503b975984a2aca240dd2d8f /CPP/Windows/Control/ComboBox.cpp | |
| parent | 5e96a8279489832924056b1fa82f29d5837c9469 (diff) | |
| download | 7zip-839151eaaad24771892afaae6bac690e31e58384.tar.gz 7zip-839151eaaad24771892afaae6bac690e31e58384.tar.bz2 7zip-839151eaaad24771892afaae6bac690e31e58384.zip | |
Diffstat (limited to 'CPP/Windows/Control/ComboBox.cpp')
| -rw-r--r-- | CPP/Windows/Control/ComboBox.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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) | |||
| 63 | } | 63 | } |
| 64 | #endif | 64 | #endif |
| 65 | 65 | ||
| 66 | LRESULT CComboBox::AddString_SetItemData(LPCWSTR s, LPARAM lParam) | ||
| 67 | { | ||
| 68 | const LRESULT index = AddString(s); | ||
| 69 | // NOTE: SetItemData((int)-1, lParam) works as unexpected. | ||
| 70 | if (index >= 0) // optional check, because (index < 0) is not expected for normal inputs | ||
| 71 | SetItemData((int)index, lParam); | ||
| 72 | return index; | ||
| 73 | } | ||
| 74 | |||
| 66 | }} | 75 | }} |
