Click here to Skip to main content
16,004,977 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralColoured Line Pin
javi_jmc17-Apr-05 22:59
javi_jmc17-Apr-05 22:59 
GeneralRe: Coloured Line Pin
Arsalan Malik17-Apr-05 23:55
Arsalan Malik17-Apr-05 23:55 
GeneralDrawText Font Pin
javi_jmc17-Apr-05 22:47
javi_jmc17-Apr-05 22:47 
GeneralMFC DLL's Pin
charu12317-Apr-05 22:34
charu12317-Apr-05 22:34 
Generaljpeg Dialog Background Pin
lewix17-Apr-05 22:20
lewix17-Apr-05 22:20 
GeneralRe: jpeg Dialog Background Pin
22491717-Apr-05 22:40
22491717-Apr-05 22:40 
Questionhow to convert a string to char so that i can get the ASCII value in vc++? Pin
nehathoma17-Apr-05 21:05
nehathoma17-Apr-05 21:05 
AnswerRe: how to convert a string to char so that i can get the ASCII value in vc++? Pin
GDavy17-Apr-05 21:20
GDavy17-Apr-05 21:20 
if you want to convert a CString, I used the following once in a similar situation.
define the next:

#if defined (_UNICODE) || defined (UNICODE)
#define _tcstombs wcstombs
#else
#define _tcstombs strncpy
#endif

//in your code you can then convert CStrings to ascii strings--

CString sOriginalStr;
.... //somewhere here sOriginalStr gets a value
char* ascStr = new char[sOriginalStr.GetLength()+1];
_tcstombs(ascStr, sOriginalStr, sOriginalStr.GetLength()+1);

.. //do your thing with the ascistring

delete[] ascStr;


Hope this gets you along...
Greetz,
Davy

AnswerRe: how to convert a string to char so that i can get the ASCII value in vc++? Pin
deldeep17-Apr-05 21:34
deldeep17-Apr-05 21:34 
Generalconvert char to ascii in vc++ Pin
nehathoma17-Apr-05 21:04
nehathoma17-Apr-05 21:04 
GeneralRe: convert char to ascii in vc++ Pin
Anonymous17-Apr-05 21:38
Anonymous17-Apr-05 21:38 
GeneralSize Window Pin
javi_jmc17-Apr-05 21:01
javi_jmc17-Apr-05 21:01 
GeneralRe: Size Window Pin
ThatsAlok17-Apr-05 21:11
ThatsAlok17-Apr-05 21:11 
GeneralRe: Size Window Pin
javi_jmc17-Apr-05 21:15
javi_jmc17-Apr-05 21:15 
GeneralSofware modems Pin
TOMCAT8117-Apr-05 20:23
TOMCAT8117-Apr-05 20:23 
GeneralGlobal Scope in C Pin
Arsalan Malik17-Apr-05 20:15
Arsalan Malik17-Apr-05 20:15 
GeneralRe: Global Scope in C Pin
22491717-Apr-05 20:47
22491717-Apr-05 20:47 
GeneralRe: Global Scope in C Pin
David Crow18-Apr-05 2:45
David Crow18-Apr-05 2:45 
GeneralRe: Global Scope in C Pin
CodeBeetle18-Apr-05 10:16
CodeBeetle18-Apr-05 10:16 
GeneralRe: Global Scope in C Pin
haritadala19-Apr-05 4:07
haritadala19-Apr-05 4:07 
Generalconvert unsigned char to const char in vc++ Pin
nehathoma17-Apr-05 19:11
nehathoma17-Apr-05 19:11 
GeneralRe: convert unsigned char to const char in vc++ Pin
ThatsAlok17-Apr-05 19:40
ThatsAlok17-Apr-05 19:40 
GeneralRe: convert unsigned char to const char in vc++ Pin
22491717-Apr-05 20:34
22491717-Apr-05 20:34 
GeneralRe: convert unsigned char to const char in vc++ Pin
ThatsAlok17-Apr-05 20:46
ThatsAlok17-Apr-05 20:46 
GeneralRe: convert unsigned char to const char in vc++ Pin
22491717-Apr-05 20:53
22491717-Apr-05 20:53 

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.