Link to home
Start Free TrialLog in
Avatar of MrNoName
MrNoName

asked on

CEdit doesn't display all symbols

In a standard appwizard project, CEdit doesn't display special characters like the trademark sign. Instead it displays a rectangular box in its place. Does anyone know how to get it to display special characters like the trademark sign?
ASKER CERTIFIED SOLUTION
Avatar of Zoppo
Zoppo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of FrenchFries
FrenchFries

I think , I insist on the fact that it would be a suggestion , that this trouble occurs when you don't specify the Unicode support ( see Unicode topic into MSDN doc )

You should use the CEdit with _T() formatting :
m_myEdit.GetWindowText(_T(mystring));

Using COM BSTR or _bstr types should also another solution
Avatar of MrNoName

ASKER

Hi Zoppo,

I'm using the font "MS Sans Seriff" -- which I'm sure is the default font for many programs...programs that are able to display the trademark sign.

Are your edits able to display the trademark sign?
Use the ALT code: 00153.
Hold the ALT key down then type 00153 one by one.
If it is able to display ™, then please tell how you handle your edits.


 I did a little test

      CString cs,ds;
    for (int i=0; i<256;i++)
     {
          ds.Format ( "%c", i );
          cs+=ds;
          if (i % 25 == 0)
               cs+="\r\n";
     }

     m_edtOne.SetWindowText ( cs );

 
  This outputs all the chars to an edit box and I see the trademark sign! Run this in your app and see what characters are available.
Hey guys...I changed the font from San Serif to Arial and I can now see the TM character...seems Zoppo was right. Thanks.