• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 431
  • Last Modified:

Display characters using ASCII values

1)I want to display some characters like (pi, omega, gamma)
in controls or on a dialog itself using ASCII values.
I understand that MFC supports ANSI character set. How to make
the settings for ASCII character set support. Is it possible
to display with ASCII values using SetWindowText or some other means?

2)I have downloaded some chinese fonts. How to display these characters
again in the controls using their ASCII values.

I have VC++ 6.0 installed

Thanks in advance
1 Solution

For setting the Chinnese fond

HFONT CreateFontIndirect(
  CONST LOGFONT* lplf   // characteristics
void SetFont(HFONT hFont,BOOL bRedraw = TRUE);

You're talking in circles.

Characters like PI, OMEGA, and GAMMA are NOT ASCII characters.  Neither are Chinese characters.

So there is no ASCII character for these.
1. You have to set "Symbol" font to the control whwe you want display these symbols.
2. Set this font to the control and use MBCS symbols to display chinese.
To set font to the control you have to:
1. Declare handle to this font as class member (CFont)
2. Create font in the OnInitDialog.
3. Set font to th e control by SetFont();
that is:
premadhasAuthor Commented:
any information on how to get pixel information about those characters in the controls
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now