Ginge, are u still using the original CHARFORMAT structure? Try using the extended CHARFORMAT2 structure. U are probably using 2.0 anyway
.
CHARFORMAT2 (MSDN)
The
CHARFORMAT2 structure contains information about character formatting in a rich edit control.
CHARFORMAT2 is a Rich Edit 2.0 extension of the
CHARFORMAT structure. Rich Edit 2.0 allows you to use either structure with the
EM_GETCHARFORMAT and
EM_SETCHARFORMAT messages.
typedef struct _charformat2 {
UINT cbSize;
DWORD dwMask;
DWORD dwEffects;
LONG yHeight;
LONG yOffset;
COLORREF crTextColor;
BYTE bCharSet;
BYTE bPitchAndFamily;
WCHAR szFaceName(LF_FACESIZE);
WORD wWeight;
SHORT sSpacing;
COLORREF crBackColor; // Background color : -)
LCID lcid;
DWORD dwReserved;
SHORT sStyle;
WORD wKerning;
BYTE bUnderlineType;
BYTE bAnimation;
BYTE bRevAuthor;
BYTE bReserved1;
} CHARFORMAT2;
Hope this helps!
Greetz