Solved

Sending a number to a control

Posted on 1998-06-29
2
165 Views
Last Modified: 2010-04-01
i want to send a number to a control for example:
int number = 50;
SetDlgItemText( hDlg, IDC_STATICTEXT1, number );
i know that wont work, so whats the right way to do it? would i convert it to char * first? if so please show me exactly how.
im using the windows api, borland c++ 5.02, and win95.
thanks.
chris
0
Comment
Question by:Vickio
2 Comments
 
LVL 1

Accepted Solution

by:
sergem earned 50 total points
Comment Utility
char szText[255];

sprintf(szText,"%i",number);
SetDlgItemText(hDlg,IDC_STATICTEXT1,szText);
0
 

Author Comment

by:Vickio
Comment Utility
thanks.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
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 viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

762 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

12 Experts available now in Live!

Get 1:1 Help Now