Click here to Skip to main content
15,888,610 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCString conversion problem Pin
Member 59031024-Mar-10 20:29
Member 59031024-Mar-10 20:29 
AnswerRe: CString conversion problem Pin
Mohan Ramachandra24-Mar-10 20:35
Mohan Ramachandra24-Mar-10 20:35 
GeneralRe: CString conversion problem Pin
Member 59031024-Mar-10 20:36
Member 59031024-Mar-10 20:36 
AnswerRe: CString conversion problem Pin
Mohan Ramachandra24-Mar-10 20:51
Mohan Ramachandra24-Mar-10 20:51 
GeneralRe: CString conversion problem Pin
Cedric Moonen24-Mar-10 21:22
Cedric Moonen24-Mar-10 21:22 
GeneralRe: CString conversion problem Pin
rajajay8224-Mar-10 22:12
rajajay8224-Mar-10 22:12 
GeneralRe: CString conversion problem Pin
CPallini24-Mar-10 22:16
mveCPallini24-Mar-10 22:16 
GeneralRe: CString conversion problem Pin
Cedric Moonen24-Mar-10 22:17
Cedric Moonen24-Mar-10 22:17 
Because if you read the documentation of the function, you will see that you get a pointer to the internal buffer of the string and that you HAVE to call ReleaseBuffer afterward (which will be often forgotten). Furthermore, why would you use GetBuffer, while the CString provides a cast operator which returns you the same thing ?
Calling GetBuffer can lead to mistakes if you forget to call ReleaseBuffer.
Cédric Moonen
Software developer

Charting control [v3.0]
OpenGL game tutorial in C++

GeneralRe: CString conversion problem Pin
Mohan Ramachandra24-Mar-10 22:49
Mohan Ramachandra24-Mar-10 22:49 
GeneralRe: CString conversion problem Pin
Cedric Moonen24-Mar-10 21:23
Cedric Moonen24-Mar-10 21:23 
GeneralRe: CString conversion problem Pin
Adam Roderick J24-Mar-10 22:14
Adam Roderick J24-Mar-10 22:14 
GeneralRe: CString conversion problem Pin
Member 59031024-Mar-10 22:23
Member 59031024-Mar-10 22:23 
GeneralRe: CString conversion problem Pin
Adam Roderick J24-Mar-10 23:17
Adam Roderick J24-Mar-10 23:17 
GeneralRe: CString conversion problem Pin
Raj Jaiswal25-Mar-10 9:33
Raj Jaiswal25-Mar-10 9:33 
QuestionMove to second monitor in MFC Pin
Anu_Bala24-Mar-10 19:20
Anu_Bala24-Mar-10 19:20 
AnswerRe: Move to second monitor in MFC Pin
Eugen Podsypalnikov24-Mar-10 21:41
Eugen Podsypalnikov24-Mar-10 21:41 
QuestionExcel C API registration interference with project dependency Pin
T210224-Mar-10 19:14
T210224-Mar-10 19:14 
QuestionTCP/IP question Pin
Alexey Malyshev24-Mar-10 14:44
Alexey Malyshev24-Mar-10 14:44 
AnswerRe: TCP/IP question Pin
Cedric Moonen24-Mar-10 21:24
Cedric Moonen24-Mar-10 21:24 
AnswerRe: TCP/IP question Pin
HimanshuJoshi24-Mar-10 23:42
HimanshuJoshi24-Mar-10 23:42 
Questionhow to use a vector for flexible length of array Pin
mrby12324-Mar-10 11:52
mrby12324-Mar-10 11:52 
AnswerRe: how to use a vector for flexible length of array Pin
Code-o-mat24-Mar-10 12:01
Code-o-mat24-Mar-10 12:01 
AnswerRe: how to use a vector for flexible length of array PinPopular
Stephen Hewitt24-Mar-10 12:34
Stephen Hewitt24-Mar-10 12:34 
AnswerRe: how to use a vector for flexible length of array Pin
sandhyasapare24-Mar-10 23:57
sandhyasapare24-Mar-10 23:57 
GeneralRe: how to use a vector for flexible length of array [modified] Pin
mrby12325-Mar-10 7:29
mrby12325-Mar-10 7:29 

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.