Click here to Skip to main content
15,911,039 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Edit Control Pin
Trupti Mehta5-Jun-08 2:39
Trupti Mehta5-Jun-08 2:39 
AnswerRe: Edit Control Pin
Jijo.Raj5-Jun-08 3:01
Jijo.Raj5-Jun-08 3:01 
GeneralRe: Edit Control Pin
David Crow5-Jun-08 3:18
David Crow5-Jun-08 3:18 
GeneralRe: Edit Control Pin
Trupti Mehta5-Jun-08 3:52
Trupti Mehta5-Jun-08 3:52 
GeneralRe: Edit Control Pin
Trupti Mehta5-Jun-08 21:56
Trupti Mehta5-Jun-08 21:56 
GeneralRe: Edit Control Pin
David Crow5-Jun-08 3:18
David Crow5-Jun-08 3:18 
GeneralRe: Edit Control Pin
Alan Balkany5-Jun-08 4:01
Alan Balkany5-Jun-08 4:01 
GeneralRe: Edit Control Pin
Trupti Mehta5-Jun-08 4:57
Trupti Mehta5-Jun-08 4:57 
OOps Alan,

CString csValue;
GetDlgItem(IDC_OpNo_EDIT)->GetWindowText( csValue );

char* str2;
str2 = (char*) (const char*)csValue;
char* stopString;

long l = strtol(str2, &stopString, 9);
int i = (int)l;

: error C2440: 'type cast' : cannot convert from 'class CString' to 'const char *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Error executing cl.exe.

Can't understand what is the solution for a simple task.
_stscanf() provided by a helpful member is also not supported by eVC++ in CE platform.


The main reason for doing this conversion is the application throws "Assertion Failure" message followed by "An unsupported operation was attempted" on UpdateData. Their is no scope to debug or find the actual error line. On commenting UpdataData, the error/message doesn't come. So am loking some way to do casting by getting the text via GetWindowText() which by default returns CString only.

I appreciate everybody's help, but still need help to get rid of error messages & make it working one way or the other. Hope to get help.

Thanks

Terry

GeneralRe: Edit Control Pin
Alan Balkany5-Jun-08 5:05
Alan Balkany5-Jun-08 5:05 
AnswerRe: Edit Control Pin
Trupti Mehta5-Jun-08 21:50
Trupti Mehta5-Jun-08 21:50 
GeneralRe: Edit Control Pin
Alan Balkany6-Jun-08 3:15
Alan Balkany6-Jun-08 3:15 
AnswerRe: Edit Control Pin
toxcct5-Jun-08 0:02
toxcct5-Jun-08 0:02 
AnswerRe: Edit Control Pin
Rajesh R Subramanian5-Jun-08 0:15
professionalRajesh R Subramanian5-Jun-08 0:15 
AnswerRe: Edit Control Pin
sudhir_Kumar5-Jun-08 0:33
sudhir_Kumar5-Jun-08 0:33 
AnswerRe: Edit Control Pin
sudhir_Kumar5-Jun-08 0:35
sudhir_Kumar5-Jun-08 0:35 
AnswerRe: Edit Control Pin
James R. Twine5-Jun-08 1:11
James R. Twine5-Jun-08 1:11 
GeneralRe: Edit Control Pin
Trupti Mehta5-Jun-08 4:21
Trupti Mehta5-Jun-08 4:21 
GeneralRe: Edit Control Pin
James R. Twine5-Jun-08 6:47
James R. Twine5-Jun-08 6:47 
AnswerRe: Edit Control Pin
David Crow5-Jun-08 2:45
David Crow5-Jun-08 2:45 
QuestionQuestion on accessing variable within innerblock? Pin
Super Hornet4-Jun-08 23:54
Super Hornet4-Jun-08 23:54 
AnswerRe: Question on accessing variable within innerblock? Pin
toxcct5-Jun-08 0:00
toxcct5-Jun-08 0:00 
AnswerRe: Question on accessing variable within innerblock? Pin
CPallini5-Jun-08 0:11
mveCPallini5-Jun-08 0:11 
AnswerRe: Question on accessing variable within innerblock? Pin
sudhir_Kumar5-Jun-08 0:29
sudhir_Kumar5-Jun-08 0:29 
AnswerRe: Question on accessing variable within innerblock? Pin
Nibu babu thomas5-Jun-08 0:58
Nibu babu thomas5-Jun-08 0:58 
AnswerRe: Question on accessing variable within innerblock? Pin
Eytukan5-Jun-08 1:58
Eytukan5-Jun-08 1:58 

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.