Hi,
I have a CComboBox that currently displays all the different selectable fonts in their respsective fonts. I have used the method:
EnumFontFamiliesEx(.....)
and it works great.
However, I now need to only show a few of these font options. Is there an easy way to just select e.g. Arial, Calibri, Times New Roman to be displayed in the combobox in their own fonts?
I couldn't find a way to do this using the EnumFontFamiliesEx method so I tried to use the following code, but it did not change the font style shown in the combo box, although the string "Arial" was added (MyComboBox class is derived from CComboBox):
void MyComboBoxClass::SetFonts()
{
CFont font;
font.CreatePointFont80,"Arial");
SetFont(&font);
CClientDC dc(this);
dc.SelectObject(&font);
AddString("Arial");
I changed the owner draw setting of the combo box to all its options and nothing helped.
Is there a simple way to do what I am trying to do, or can someone help me figure out the complicated way please?
Very many thanks in advance for any help.