Solved

Display characters using ASCII values

Posted on 2002-04-30
4
385 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
4 Comments
 
LVL 3

Expert Comment

by:job_s
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
any information on how to get pixel information about those characters in the controls
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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…
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now