BOOL PropCompare::OnInitDialog()
{
CComboBox * combo = (CComboBox*) GetDlgItem(IDC_DIFF_ALGORITHM);
-
- combo->AddString(_("default").c_str());
- combo->AddString(_("minimal").c_str());
- combo->AddString(_("patience").c_str());
- combo->AddString(_("histogram").c_str());
- combo->AddString(_("none").c_str());
+ for (const auto& item : { _("default"), _("minimal"), _("patience"), _("histogram"), _("none") })
+ combo->AddString(item.c_str());
combo->SetCurSel(m_nDiffAlgorithm);
OptionsPanel::OnInitDialog();
OptionsPanel::OnInitDialog();
CComboBox * combo = (CComboBox*) GetDlgItem(IDC_COMPAREMETHODCOMBO);
- String item = _("Full Contents");
- combo->AddString(item.c_str());
- item = _("Quick Contents");
- combo->AddString(item.c_str());
- item = _("Binary Contents");
- combo->AddString(item.c_str());
- item = _("Modified Date");
- combo->AddString(item.c_str());
- item = _("Modified Date and Size");
- combo->AddString(item.c_str());
- item = _("Size");
- combo->AddString(item.c_str());
+ for (const auto& item : { _("Full Contents"), _("Quick Contents"), _("Binary Contents"), _("Modified Date"), _("Modified Date and Size"), _("Size") })
+ combo->AddString(item.c_str());
combo->SetCurSel(m_compareMethod);
UpdateControls();
BOOL PropCompareImage::OnInitDialog()
{
CComboBox * combo = (CComboBox*) GetDlgItem(IDC_COMPAREIMAGE_OCR_RESULT_TYPE);
-
- combo->AddString(_("Text only").c_str());
- combo->AddString(_("Line-by-line position and text").c_str());
- combo->AddString(_("Word-by-word position and text").c_str());
+ for (const auto& item : { _("Text only"), _("Line-by-line position and text"), _("Word-by-word position and text") })
+ combo->AddString(item.c_str());
combo->SetCurSel(m_nOcrResultType);
OptionsPanel::OnInitDialog();
BOOL PropCompareWebPage::OnInitDialog()
{
CComboBox * combo = (CComboBox*) GetDlgItem(IDC_COMPAREWEBPAGE_USERDATAFOLDER_TYPE);
-
- combo->AddString(_("AppData folder").c_str());
- combo->AddString(_("Install folder").c_str());
+ for (const auto& item : { _("AppData folder"), _("Install folder") })
+ combo->AddString(item.c_str());
combo->SetCurSel(m_nUserDataFolderType);
OptionsPanel::OnInitDialog();
void PropEditor::LoadComboBoxStrings()
{
CComboBox * cbo = (CComboBox *)GetDlgItem(IDC_BREAK_TYPE);
- cbo->AddString(_("Break at whitespace").c_str());
- cbo->AddString(_("Break at whitespace or punctuation").c_str());
+ for (const auto& item : { _("Break at whitespace"), _("Break at whitespace or punctuation") })
+ cbo->AddString(item.c_str());
cbo = (CComboBox *)GetDlgItem(IDC_RENDERING_MODE);
- cbo->AddString(_("GDI").c_str());
- cbo->AddString(_("DirectWrite Default").c_str());
- cbo->AddString(_("DirectWrite Aliased").c_str());
- cbo->AddString(_("DirectWrite GDI Classic").c_str());
- cbo->AddString(_("DirectWrite GDI Natural").c_str());
- cbo->AddString(_("DirectWrite Natural").c_str());
- cbo->AddString(_("DirectWrite Natural Symmetric").c_str());
+ for (const auto& item : { _("GDI"), _("DirectWrite Default"), _("DirectWrite Aliased"), _("DirectWrite GDI Classic"), _("DirectWrite GDI Natural"), _("DirectWrite Natural"), _("DirectWrite Natural Symmetric") })
+ cbo->AddString(item.c_str());
}
/**
CComboBox *pWnd = (CComboBox*)GetDlgItem(IDC_AUTO_COMPLETE_SOURCE);
ASSERT(pWnd != nullptr);
- pWnd->AddString(_("Disabled").c_str());
- pWnd->AddString(_("From file system").c_str());
- pWnd->AddString(_("From Most Recently Used list").c_str());
+ for (const auto& item : { _("Disabled"), _("From file system"), _("From Most Recently Used list") })
+ pWnd->AddString(item.c_str());
pWnd->SetCurSel(m_nAutoCompleteSource);
pWnd = (CComboBox*)GetDlgItem(IDC_ESC_CLOSES_WINDOW);
ASSERT(pWnd != nullptr);
- pWnd->AddString(_("Disabled").c_str());
- pWnd->AddString(_("MDI child window or main window").c_str());
- pWnd->AddString(_("MDI child window only").c_str());
- pWnd->AddString(_("Close main window if there is only one MDI child window").c_str());
+ for (const auto& item : { _("Disabled"), _("MDI child window or main window"), _("MDI child window only"), _("Close main window if there is only one MDI child window") })
+ pWnd->AddString(item.c_str());
pWnd->SetCurSel(m_nCloseWindowWithEsc);
pWnd = (CComboBox*)GetDlgItem(IDC_SINGLE_INSTANCE);
ASSERT(pWnd != nullptr);
- pWnd->AddString(_("Disabled").c_str());
- pWnd->AddString(_("Allow only one instance to run").c_str());
- pWnd->AddString(_("Allow only one instance to run and wait for the instance to terminate").c_str());
+ for (const auto& item : { _("Disabled"), _("Allow only one instance to run"), _("Allow only one instance to run and wait for the instance to terminate") })
+ pWnd->AddString(item.c_str());
pWnd->SetCurSel(m_nSingleInstance);
pWnd = (CComboBox*)GetDlgItem(IDC_AUTO_RELOAD_MODIFIED_FILES);
ASSERT(pWnd != nullptr);
- pWnd->AddString(_("Disabled").c_str());
- pWnd->AddString(_("Only on window activated").c_str());
- pWnd->AddString(_("Immediately").c_str());
+ for (const auto& item : { _("Disabled"), _("Only on window activated"), _("Immediately") })
+ pWnd->AddString(item.c_str());
pWnd->SetCurSel(m_nFileReloadMode);