I designed a font "WAG Symbols" that contains symbols in the private use area of unicode.
Now I want to develop an insertable object that can handle these characters so they become visible in, let's say MS Word.
In Word, when the control is active, the unicdoe characters are displayed as should. When the control is inactive, the private use area characters are all replaced by ?
In the ActiveX Control Test Container this behaviour occurs when selecting Control ==Draw Metafile.
Any idea what causes this behaviour?
This is the code in the OnDraw member of my control:
void CWagRoutineXCtrl::OnDraw(
CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid)
{
if (!pdc)
return;
// create and select it
CFont newFont;
newFont.CreateFont(
-20, // point size
0, 0, 0,
FW_NORMAL, // weight, also FW_BOLD
0, // if 1 = italic
0, // if 1 = underline
0, // if 1 = strike through
0, 0, 0, 0, 0,
_T("WAG Symbols") ); // typeface
CFont* pOldFont = pdc->SelectObject(&newFont);
CString cs;
cs.Format( _T("Unicode: %c%c%c"), 0xEA53, 0xEA5E, 0xEAA4 );
pdc->TextOut( 0, 0, cs );
pdc->SelectObject( pOldFont );
}