Listing 1 First version of the PopulateHelper class
class PopulateHelper { // one for CComboBox void fill(CComboBox &ctrl, std::vector<std::string> &strs) { ctrl.ResetContent(); for (int ii=0; ii<strs.size(); ++ii) ctrl.AddString(strs[ii]); } // body identical to above, just the method signature differs void fill(CListBox &ctrl, std::vector<std::string> &strs) { ctrl.ResetContent(); for (int ii=0; ii<strs.size(); ++ii) ctrl.AddString(strs[ii]); } };