Click here to Skip to main content
15,920,513 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Having trouble retreiving a integer value from the Edit Control Box. [modified] Pin
Nelek1-Jun-08 5:53
protectorNelek1-Jun-08 5:53 
GeneralRe: Having trouble retreiving a integer value from the Edit Control Box. Pin
Joe Woodbury1-Jun-08 11:40
professionalJoe Woodbury1-Jun-08 11:40 
GeneralRe: Having trouble retreiving a integer value from the Edit Control Box. Pin
Nelek2-Jun-08 4:32
protectorNelek2-Jun-08 4:32 
AnswerRe: Having trouble retreiving a integer value from the Edit Control Box. Pin
Michael Schubert30-May-08 12:49
Michael Schubert30-May-08 12:49 
QuestionRe: Having trouble retreiving a integer value from the Edit Control Box. Pin
Rajesh R Subramanian30-May-08 21:01
professionalRajesh R Subramanian30-May-08 21:01 
AnswerRe: Having trouble retreiving a integer value from the Edit Control Box. Pin
Nelek2-Jun-08 6:22
protectorNelek2-Jun-08 6:22 
AnswerRe: Having trouble retreiving a integer value from the Edit Control Box. Pin
hilop2-Jun-08 7:00
hilop2-Jun-08 7:00 
GeneralRe: Having trouble retreiving a integer value from the Edit Control Box. Pin
Nelek3-Jun-08 21:38
protectorNelek3-Jun-08 21:38 
hilop wrote:

m_entered_number.GetWindowText( temp_CString );
entered_number = atoi( temp_CString );


You are using it wrongly. If you declare the member variable as numeric then you can not use it. (see my downvoted answer)

If you want to use that functions you have to declare the member variable as CEdit.

Or do it programmatically:

CEdit* pEdit = GetDialogItem (IDC_MYEDIT);
pEdit->GetWindowText (strTemp);
number = atoi (strTemp);


PS: I don't have VC++ in this laptop and I don't remember if the function is GetDialogItem or GetDlgItem. Check you local help, it anyways is a member function of CDialog

Regards.
--------
M.D.V. Wink | ;)

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.

AnswerRe: Having trouble retreiving a integer value from the Edit Control Box. Pin
ThatsAlok20-Jul-09 1:04
ThatsAlok20-Jul-09 1:04 
QuestionCreating a .docx file programatically? Pin
ritz123430-May-08 5:12
ritz123430-May-08 5:12 
AnswerRe: Creating a .docx file programatically? Pin
Cedric Moonen30-May-08 6:05
Cedric Moonen30-May-08 6:05 
GeneralRe: Creating a .docx file programatically? Pin
led mike30-May-08 6:13
led mike30-May-08 6:13 
AnswerRe: Creating a .docx file programatically? Pin
led mike30-May-08 6:13
led mike30-May-08 6:13 
AnswerRe: Creating a .docx file programatically? Pin
David Crow30-May-08 7:56
David Crow30-May-08 7:56 
QuestionError with CArray, CMap Pin
Trupti Mehta30-May-08 4:44
Trupti Mehta30-May-08 4:44 
QuestionRe: Error with CArray, CMap Pin
David Crow30-May-08 4:59
David Crow30-May-08 4:59 
AnswerRe: Error with CArray, CMap Pin
Jijo.Raj30-May-08 5:52
Jijo.Raj30-May-08 5:52 
GeneralRe: Error with CArray, CMap Pin
Trupti Mehta30-May-08 22:41
Trupti Mehta30-May-08 22:41 
GeneralRe: Error with CArray, CMap Pin
Jijo.Raj30-May-08 23:16
Jijo.Raj30-May-08 23:16 
GeneralRe: Error with CArray, CMap Pin
Trupti Mehta31-May-08 0:38
Trupti Mehta31-May-08 0:38 
GeneralRe: Error with CArray, CMap Pin
Jijo.Raj31-May-08 6:28
Jijo.Raj31-May-08 6:28 
GeneralRe: Error with CArray, CMap Pin
Trupti Mehta1-Jun-08 0:05
Trupti Mehta1-Jun-08 0:05 
GeneralRe: Error with CArray, CMap Pin
Jijo.Raj1-Jun-08 1:59
Jijo.Raj1-Jun-08 1:59 
GeneralRe: Error with CArray, CMap Pin
Trupti Mehta1-Jun-08 8:57
Trupti Mehta1-Jun-08 8:57 
GeneralRe: Error with CArray, CMap Pin
Jijo.Raj1-Jun-08 23:11
Jijo.Raj1-Jun-08 23:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.