Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieve integer value from an edit box

Status
Not open for further replies.

MindCracker

Programmer
Aug 27, 2002
21
0
0
GB
Anyone knows how to retrieve the integer value input in an edit box? Please help
 
Hi

Use GetDlgItemInt() function

Thierry
 
Hi Thierry,

Thank you for your reply. I have some problems on top of the one posted and hope you could help.

1) I have two CListBox named as Table and Column. When I imported the database using ODBC (in excel), and a list of table name appears in Table ListBox. As the mouse click on any table on the list, the Column will read that specified table and list out the column names.

My question: How to make the program to select the first table and column on the top by default?

2) In the Column CListBox, it shows:

checkbox Time Float(3)
checkbox Toronto String
checkbox California String

There is a attribute change button in which when I push it, a second dialog will appear. If the fist column has been selected by default (float(3), how to make the second dialog box to know that the selected column is Float and thus, set the check as shown in the appearance of my dialog box?????? :

Type:
Check1. Integer
Check2. Float (after detecting the column is Float, then this is checked!)
Scaling exponent
Edit box (User can change the default value: 3 to any value for
example : 1 which will effectively change the Float(3) in
the column to Float(1) ). How to do this too????
Check3: String

Sorry for too many questions at one time. I have bee nstruggling for days to do this. Please try to explain me in detail as my knowledge in C++ is limited. I thank you for your help and support in advance. Deeply appreciate that.

best regards,
 
also,

whenever I tried to put this line:

CString selectedcolumn;
m_ctrlCheckListBox.GetText(m_ctrlCheckListBox.GetCurSel(),selectedcolumn);

I always got the error:

Debug Assertion Failed!
Program:C:\............
File: afxwin2.ini
Line: 616

Why is that? Thanks....
 
Oops, sorry for the confusion. This is not my posted messages. I overlooked it. Mine is quite similar posted in : Problem of using Switch statement to display data in CListBox

Look forward to your help, if possible

cheers,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top