Generalize code that populates MFC list control?
To Generalize it:

class MyDialog
{
    template&lt;typename T, typename A&gt;
    void SetCustomerList(T const&amp; customers, A action);
    ....
};


template&lt;typename T, typename A&gt;
void MyDialog::SetCustomerList(T const&amp; customers, A action)
{
    .....
    // AddCustomerToListControl(*it);
    action(*it);
    .....
}

// At call point:
SetCustomerList(customers, &amp;AddCustomerToListControl);


Other Changes:
You can use the standard algorithms:

    for(std::list&lt;Customer*&gt;::const_iterator it = customers.begin();
            it != customers.end() ; it ++)
    {
        AddCustomerToListControl(*it);
    }


Can be replaced with:

    std::for_each(customer.begin(), customer.end(), AddCustomerToListControl);
    // or in the new code:
    std::for_each(customer.begin(), customer.end(), action);