I have a MFC dialog program in which I create a few CStatic and CEdit controls at runtime. Somehow the text in these controls aren't Cleartype enabled (Cleartype in Windows smoothes texts by sub-pixel positioning and coloring).
However, when one manually adds an "Edit Control" or a "Static Text" control at design time from the Visual Studio Toolbox these controls ARE Cleartype enabled.
So somehow the controls from the toolbox are different from the controls created at runtime? Does anyone know how to enable Cleartype for text controls created at runtime? Here's a code snippet of a CStatic control creation in the OnCreate function of the dialog:
CRect crc; crc.SetRect(100, 10, 300, 40);
m_static.Create(_T("Personeelsnummer?"), WS_CHILD | WS_VISIBLE, crc, this, IDC_STATIC1);
The text in this CStatic control is not Cleartype enabled. Setting a different font has no effect.
I'm lost.