Solved

display a unsigned char value in a edit control

Posted on 1998-08-07
2
251 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 100 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

Independent Software Vendors: 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

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

739 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