Click here to Skip to main content
15,897,371 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: cstring to tchar conversion Pin
Rajkumar R4-Feb-08 21:53
Rajkumar R4-Feb-08 21:53 
GeneralRe: cstring to tchar conversion Pin
Rajesh R Subramanian4-Feb-08 22:08
professionalRajesh R Subramanian4-Feb-08 22:08 
GeneralRe: cstring to tchar conversion Pin
CPallini4-Feb-08 22:18
mveCPallini4-Feb-08 22:18 
GeneralRe: cstring to tchar conversion Pin
Rajesh R Subramanian4-Feb-08 22:25
professionalRajesh R Subramanian4-Feb-08 22:25 
GeneralRe: cstring to tchar conversion Pin
CPallini4-Feb-08 22:36
mveCPallini4-Feb-08 22:36 
GeneralRe: cstring to tchar conversion Pin
Rajkumar R4-Feb-08 23:11
Rajkumar R4-Feb-08 23:11 
GeneralRe: cstring to tchar conversion Pin
Rajesh R Subramanian4-Feb-08 23:19
professionalRajesh R Subramanian4-Feb-08 23:19 
GeneralRe: cstring to tchar conversion Pin
Rajkumar R5-Feb-08 7:00
Rajkumar R5-Feb-08 7:00 
Rajesh R Subramanian wrote:
but I am not in need of this information.


this is not for ur info and to mispell it, the similarity i meant here is, if the person is forgetting to write ReleaseBuffer, the same can happen in delete, and also between CreateFile-CloseHandle, GetDC-ReleaseDC, lock-unlock, ... It all upto the programmer who should be careful writting a single character of production quality code.


Rajesh R Subramanian wrote:
We may do it, becasue we know it. You can't expect the O.P. to always know it.


ignorance and carelessness will always leads to bugs. I don't think this argument is supportive.


Rajesh R Subramanian wrote:
Also, I've stated several times this is not the best approach

It is not supported by valid statements.
I believe this class is not designed by a team of junk fellows, they might have analysed many usecases. Direct use of CString with C-Style API, System API considering performance (while calling ReleaseBuffer CString is updated without need to assign back the editted one) and ease of use...

Rajesh R Subramanian wrote:
I would not recommend the usage of GetBuffer() method for the sake of copying the string content to another TCHAR* .

make no sense, example i have given is tcscpy doesnot mean that it is for the sake of copy.
if you meant that getbuffer is making copy FYI it does return pointer without any copy unless the required buffer size is greater, the editted TCHAR data is also not copied back to CString
GeneralRe: cstring to tchar conversion Pin
Rajesh R Subramanian5-Feb-08 19:54
professionalRajesh R Subramanian5-Feb-08 19:54 
GeneralRe: cstring to tchar conversion Pin
Rajkumar R5-Feb-08 20:40
Rajkumar R5-Feb-08 20:40 
GeneralRe: cstring to tchar conversion Pin
Rajesh R Subramanian5-Feb-08 21:14
professionalRajesh R Subramanian5-Feb-08 21:14 
GeneralRe: cstring to tchar conversion Pin
CPallini4-Feb-08 22:15
mveCPallini4-Feb-08 22:15 
GeneralRe: cstring to tchar conversion Pin
Rajkumar R4-Feb-08 23:07
Rajkumar R4-Feb-08 23:07 
GeneralRe: cstring to tchar conversion Pin
CPallini4-Feb-08 23:19
mveCPallini4-Feb-08 23:19 
GeneralRe: cstring to tchar conversion Pin
Rajkumar R4-Feb-08 23:23
Rajkumar R4-Feb-08 23:23 
JokeRe: cstring to tchar conversion Pin
CPallini5-Feb-08 0:00
mveCPallini5-Feb-08 0:00 
GeneralRe: cstring to tchar conversion Pin
Rajkumar R5-Feb-08 0:06
Rajkumar R5-Feb-08 0:06 
GeneralRe: cstring to tchar conversion Pin
CPallini5-Feb-08 0:18
mveCPallini5-Feb-08 0:18 
JokeRe: cstring to tchar conversion Pin
Rajkumar R5-Feb-08 18:39
Rajkumar R5-Feb-08 18:39 
GeneralRe: cstring to tchar conversion Pin
CPallini5-Feb-08 20:50
mveCPallini5-Feb-08 20:50 
AnswerRe: cstring to tchar conversion Pin
Rajkumar R4-Feb-08 21:08
Rajkumar R4-Feb-08 21:08 
GeneralRe: cstring to tchar conversion Pin
Francis K Antony4-Feb-08 23:11
Francis K Antony4-Feb-08 23:11 
QuestionRe: cstring to tchar conversion Pin
Rajkumar R4-Feb-08 23:27
Rajkumar R4-Feb-08 23:27 
GeneralRe: cstring to tchar conversion Pin
Francis K Antony4-Feb-08 23:48
Francis K Antony4-Feb-08 23:48 
QuestionRe: cstring to tchar conversion Pin
Rajkumar R4-Feb-08 23:58
Rajkumar R4-Feb-08 23: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.