?
Solved

display a unsigned char value in a edit control

Posted on 1998-08-07
2
Medium Priority
?
255 Views
Last Modified: 2010-04-10
i try to display a unsigned char value in a CEdit control CFormView->CEdit.SetWindowText(value);
but SetWindowText methode accept just CString typ, how can i convert this value, if value=12 user
must see in dialog 12.
if i use a CStatic control how can i slove the same problem.

                                      best regards
0
Comment
Question by:saidi
[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
  • 2
2 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 400 total points
ID: 1169596
CString strText;
strText.Format(_T("%u"), (unsigned int)value);
CFormView->CEdit.SetWindowText(value);

For CStatic, it is the same since you have got the CString.
0
 
LVL 23

Expert Comment

by:chensu
ID: 1169597
Sorry, it should have been

CString strText;
strText.Format(_T("%u"), (unsigned int)value);
CFormView->CEdit.SetWindowText(strText);

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
Suggested Courses

770 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