|
-
May 10th, 1999, 11:52 PM
#2
Re: Displaying Integers in List Box
> I have set the listbox to be of type int in the property panel.
I don't know what you mean by this since the standard listbox has no such property in Visual C++, though in VB you can set a listbox property data format as Number with 0 decimal places.
In C++, convert the integer to a string, then call InsertString():
int nIndex = 2;
char* pInteger = "100";
char pIToA[10]; // make it large enough to hold the largest integer plus a null byte
itoa( pInteger, pIToA, 10);
listbox.InsertString( nIndex, pIToA );
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|