Solved

Display characters using ASCII values

Posted on 2002-04-30
4
419 Views
Last Modified: 2013-12-03
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
Prem
0
Comment
Question by:premadhas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 3

Expert Comment

by:job_s
ID: 6980496
2.

For setting the Chinnese fond
use

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





0
 
LVL 32

Expert Comment

by:jhance
ID: 6980497
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.
0
 
LVL 12

Accepted Solution

by:
migel earned 100 total points
ID: 6980510
Hi!
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:
m_wndMyStaticControlToDisplaySymbols.SetFont(&m_fntSymbol);
0
 

Author Comment

by:premadhas
ID: 6988306
any information on how to get pixel information about those characters in the controls
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question