Displaying Integers in an Edit Box or List Box 
Author Message
 Displaying Integers in an Edit Box or List Box

I am trying to write a program using Visual C++ 5 which performs a
calculation using a loop and produces, say, 10 integers before it stops. I
found it easy enough to display these in a console application but I dont
how i can print them into an Edit Box or a List Box. Could anyone tell me
how to do this?

Thanks very much

Ben Abrahams



Sat, 29 Jun 2002 03:00:00 GMT  
 Displaying Integers in an Edit Box or List Box
Associate a member variable with the edit control from ClassWizard, then do
this:

CString strText;
strText.Format( "number is %d", iNumber );
m_ctlEdit.SetWindowText( strText );

Mark.

=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
Get the smart HTML editor and validator,
SmartSite, from http://www.mjsoft.co.uk



Quote:
> I am trying to write a program using Visual C++ 5 which performs a
> calculation using a loop and produces, say, 10 integers before it stops. I
> found it easy enough to display these in a console application but I dont
> how i can print them into an Edit Box or a List Box. Could anyone tell me
> how to do this?

> Thanks very much

> Ben Abrahams



Sat, 29 Jun 2002 03:00:00 GMT  
 Displaying Integers in an Edit Box or List Box
Or, create a CListBox and associate it with your list box control.  Then call
AddString for each row in the list.


Sun, 30 Jun 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Displaying integer values in an Edit box

2. Displaying integer values in an Edit box

3. list box text to edit box

4. writing to a list box or edit box from C

5. Disabling editing of list box items in the file open dialog box

6. edit box and list box questins

7. press enter in an edit box and make it happen in an other edit box too

8. *** Edit box *** Edit Box *****

9. **** Edit box *** Edit box ***

10. Using a list box to edit labels in a list control

11. Transfer of data from an edit box in one dialog box to a list box in another dialog box II

12. converting the data capturerd through an edit box into integer

 

 
Powered by phpBB® Forum Software