Click here to Skip to main content
16,005,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: use of template class and operator-> Pin
Guido Loupias7-Apr-04 3:29
Guido Loupias7-Apr-04 3:29 
QuestionX10 C/C++ API? Pin
Ravi Bhavnani6-Apr-04 11:11
professionalRavi Bhavnani6-Apr-04 11:11 
AnswerFound it! Pin
Ravi Bhavnani6-Apr-04 12:44
professionalRavi Bhavnani6-Apr-04 12:44 
QuestionCString to DWORD ? INT ? Pin
LudaLuda6-Apr-04 11:11
LudaLuda6-Apr-04 11:11 
AnswerRe: CString to DWORD ? INT ? Pin
Ravi Bhavnani6-Apr-04 11:16
professionalRavi Bhavnani6-Apr-04 11:16 
GeneralRe: CString to DWORD ? INT ? Pin
LudaLuda6-Apr-04 11:26
LudaLuda6-Apr-04 11:26 
GeneralRe: CString to DWORD ? INT ? Pin
Ravi Bhavnani6-Apr-04 11:31
professionalRavi Bhavnani6-Apr-04 11:31 
AnswerRe: CString to DWORD ? INT ? Pin
avenger_sb256-Apr-04 11:49
avenger_sb256-Apr-04 11:49 
Very Simple Smile | :)

Convert CString to String and then to int/double(whatever)

DWORD myfunc()
{
CString strVal="5.5";
char *str;
//allocate equivalent memory for the character array.
//'+1' is the space for NULL CHARACTER str=new char[CString.GetLength()+1];
for(int i=0;i<CString.GetLength();i++)
{
str[i]=CString.GetAt(i);
}
str[i]='\0'; //NULL Terminate the string

return atol(str); //RETURN AS INT
//OR
return atof(str); //RETURN AS DOUBLE
}


I hope this solves ur problem.


Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs
GeneralRe: CString to DWORD ? INT ? Pin
Prakash Nadar6-Apr-04 15:31
Prakash Nadar6-Apr-04 15:31 
GeneralCListCtrl - Highlighting all of the selected row Pin
mmica6-Apr-04 10:59
mmica6-Apr-04 10:59 
GeneralRe: CListCtrl - Highlighting all of the selected row Pin
Ravi Bhavnani6-Apr-04 11:06
professionalRavi Bhavnani6-Apr-04 11:06 
Generalclipped controls Pin
pgiustinoni6-Apr-04 6:37
pgiustinoni6-Apr-04 6:37 
GeneralRe: clipped controls Pin
avenger_sb256-Apr-04 7:27
avenger_sb256-Apr-04 7:27 
GeneralShowWindow problem Pin
reznod6-Apr-04 6:09
reznod6-Apr-04 6:09 
GeneralRe: ShowWindow problem Pin
Prakash Nadar6-Apr-04 7:02
Prakash Nadar6-Apr-04 7:02 
GeneralRe: ShowWindow problem Pin
reznod6-Apr-04 7:35
reznod6-Apr-04 7:35 
GeneralRe: ShowWindow problem Pin
reznod6-Apr-04 7:47
reznod6-Apr-04 7:47 
GeneralRe: ShowWindow problem Pin
Prakash Nadar6-Apr-04 15:28
Prakash Nadar6-Apr-04 15:28 
GeneralRe: ShowWindow problem Pin
reznod6-Apr-04 15:55
reznod6-Apr-04 15:55 
General(Another) Debug VS Release crash - help needed! Pin
JonCage6-Apr-04 5:22
JonCage6-Apr-04 5:22 
GeneralRe: (Another) Debug VS Release crash - help needed! Pin
antlers6-Apr-04 5:59
antlers6-Apr-04 5:59 
GeneralRe: (Another) Debug VS Release crash - help needed! Pin
Anders Molin6-Apr-04 13:30
professionalAnders Molin6-Apr-04 13:30 
GeneralRe: (Another) Debug VS Release crash - help needed! Pin
2249176-Apr-04 20:55
2249176-Apr-04 20:55 
GeneralRe: (Another) Debug VS Release crash - help needed! Pin
JonCage6-Apr-04 22:16
JonCage6-Apr-04 22:16 
GeneralRe: (Another) Debug VS Release crash - help needed! Pin
Paul Ranson7-Apr-04 4:08
Paul Ranson7-Apr-04 4:08 

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.