Click here to Skip to main content
15,885,757 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: saving file [modified] Pin
trioum25-May-09 1:02
trioum25-May-09 1:02 
GeneralRe: saving file Pin
killabyte25-May-09 20:34
killabyte25-May-09 20:34 
QuestionRe: saving file Pin
Maximilien25-May-09 4:56
Maximilien25-May-09 4:56 
QuestionANSI to UTF-8 Pin
Souldrift24-May-09 23:15
Souldrift24-May-09 23:15 
AnswerRe: ANSI to UTF-8 Pin
tolw25-May-09 1:00
tolw25-May-09 1:00 
AnswerRe: ANSI to UTF-8 Pin
Nibu babu thomas25-May-09 2:02
Nibu babu thomas25-May-09 2:02 
GeneralRe: ANSI to UTF-8 Pin
Souldrift25-May-09 2:34
Souldrift25-May-09 2:34 
GeneralRe: ANSI to UTF-8 Pin
tolw25-May-09 2:56
tolw25-May-09 2:56 
Since m_pData is a string you can use string operations like strlen. Try this:
char *text = new char[strlen( m_pData ) + 1 /*The +1 is for the End-of-String \0*/];
WCHAR *w = new WCHAR[strlen( m_pData ) + 1];
int erg=0;

strcpy(text, m_pData);

erg=MultiByteToWideChar(CP_ACP, 0, text, -1, w, strlen( text )); // ANSI to UNICODE
erg=WideCharToMultiByte(CP_UTF8, 0, w, -1, text, wcslen( w ), 0, 0); // UNICODE to UTF-8

Just make sure that the strings are all NULL terminated!!
Questionerror LNK2019: unresolved external symbol "long __cdecl _com_dispatch_method Pin
pandit8424-May-09 23:14
pandit8424-May-09 23:14 
AnswerRe: error LNK2019: unresolved external symbol "long __cdecl _com_dispatch_method Pin
Stuart Dootson25-May-09 1:42
professionalStuart Dootson25-May-09 1:42 
QuestionHEAP CORRUPTION DETECTED! Pin
susanne124-May-09 23:01
susanne124-May-09 23:01 
AnswerRe: HEAP CORRUPTION DETECTED! Pin
CPallini24-May-09 23:19
mveCPallini24-May-09 23:19 
GeneralRe: HEAP CORRUPTION DETECTED! Pin
susanne124-May-09 23:50
susanne124-May-09 23:50 
QuestionRe: HEAP CORRUPTION DETECTED! Pin
CPallini25-May-09 0:03
mveCPallini25-May-09 0:03 
AnswerRe: HEAP CORRUPTION DETECTED! Pin
susanne125-May-09 0:13
susanne125-May-09 0:13 
GeneralRe: HEAP CORRUPTION DETECTED! Pin
Garth J Lancaster25-May-09 0:18
professionalGarth J Lancaster25-May-09 0:18 
GeneralRe: HEAP CORRUPTION DETECTED! Pin
CPallini25-May-09 0:25
mveCPallini25-May-09 0:25 
QuestionRe: HEAP CORRUPTION DETECTED! Pin
CPallini25-May-09 0:27
mveCPallini25-May-09 0:27 
AnswerRe: HEAP CORRUPTION DETECTED! Pin
susanne125-May-09 0:32
susanne125-May-09 0:32 
GeneralRe: HEAP CORRUPTION DETECTED! Pin
Stuart Dootson25-May-09 1:49
professionalStuart Dootson25-May-09 1:49 
JokeRe: HEAP CORRUPTION DETECTED! Pin
Rajesh R Subramanian25-May-09 1:57
professionalRajesh R Subramanian25-May-09 1:57 
QuestionNeed Help With Callback Functions [noob] Pin
LCARS x3224-May-09 22:22
LCARS x3224-May-09 22:22 
QuestionProblem in CeCreateProcess ? Pin
Le@rner24-May-09 22:16
Le@rner24-May-09 22:16 
AnswerRe: Problem in CeCreateProcess ? Pin
Randor 25-May-09 8:22
professional Randor 25-May-09 8:22 
GeneralRe: Problem in CeCreateProcess ? Pin
Le@rner25-May-09 18:59
Le@rner25-May-09 18:59 

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.