Add new items to top.
(This summarizes all changes to all files under Src, including Src\Languages.)
+2006-07-15 Kimmo
+ Strip SuperComboBox strings before saving
+ Src/Common: SuperComboBox.cpp
+
2006-07-14 WinMerge experimental release 2.5.5.3 (cvs)
2006-07-14 Kimmo
}
}
+/**
+ * @brief Saves strings in combobox.
+ * This function saves strings in combobox, in editbox and in dropdown.
+ * Whitespace characters are stripped from begin and end of the strings
+ * before saving. Empty strings are not saved. So strings which have only
+ * whitespace characters aren't save either.
+ * @param [in] szRegSubKey Registry subkey where to save strings.
+ * @param [in] nMaxItems Max number of strings to save.
+ */
void CSuperComboBox::SaveState(LPCTSTR szRegSubKey, UINT nMaxItems)
{
CString strItem,s,s2;
for (i=0; i < cnt && idx < (int)nMaxItems; i++)
{
GetLBText(i, s);
- if (s != strItem
- && !s.IsEmpty())
+ s.TrimLeft();
+ s.TrimRight();
+ if (s != strItem && !s.IsEmpty())
{
s2.Format(_T("Item_%d"), idx);
AfxGetApp()->WriteProfileString(szRegSubKey, s2, s);