Click here to Skip to main content
15,910,877 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: life cycle of exception object Pin
George_George3-Feb-08 22:56
George_George3-Feb-08 22:56 
GeneralRe: life cycle of exception object Pin
Maxwell Chen3-Feb-08 23:02
Maxwell Chen3-Feb-08 23:02 
GeneralRe: life cycle of exception object Pin
George_George3-Feb-08 23:24
George_George3-Feb-08 23:24 
GeneralRe: life cycle of exception object Pin
Maxwell Chen3-Feb-08 23:35
Maxwell Chen3-Feb-08 23:35 
GeneralRe: life cycle of exception object Pin
George_George3-Feb-08 23:50
George_George3-Feb-08 23:50 
Generalcstring to tchar* conversion Pin
guru moorthy.k3-Feb-08 21:05
guru moorthy.k3-Feb-08 21:05 
GeneralRe: cstring to tchar* conversion Pin
Cedric Moonen3-Feb-08 21:11
Cedric Moonen3-Feb-08 21:11 
GeneralRe: cstring to tchar* conversion [modified] Pin
CPallini3-Feb-08 21:46
mveCPallini3-Feb-08 21:46 
Usually you don't need a pointer to TCHAR but rather a pointer to const one (i.e. const TCHAR *). If this is your requirement then, as suggested by Cedric Moonen, simply use CString cast operator to LPCTSTR, for instance:
CString str=_T("foo");
const TCHAR * psz = str; // implicit call to CString (LPCTSTR) cast operator


On the other hand, if you need a pointer to the editable string buffer, then you can't avoid using CString::GetBuffer method (and you have to be careful).
Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

[my articles]


modified on Monday, February 04, 2008 8:10:33 AM

GeneralRe: cstring to tchar* conversion Pin
toxcct4-Feb-08 1:48
toxcct4-Feb-08 1:48 
GeneralRe: cstring to tchar* conversion Pin
CPallini4-Feb-08 2:06
mveCPallini4-Feb-08 2:06 
GeneralRe: cstring to tchar* conversion Pin
toxcct4-Feb-08 2:11
toxcct4-Feb-08 2:11 
GeneralRe: cstring to tchar* conversion Pin
CPallini4-Feb-08 2:16
mveCPallini4-Feb-08 2:16 
Generalsmall issue with combo box. Pin
Chandrasekharan P3-Feb-08 20:58
Chandrasekharan P3-Feb-08 20:58 
GeneralRe: small issue with combo box. Pin
CPallini3-Feb-08 22:02
mveCPallini3-Feb-08 22:02 
GeneralRe: small issue with combo box. Pin
Chandrasekharan P4-Feb-08 0:15
Chandrasekharan P4-Feb-08 0:15 
Questionhow to devide the client rect of frame window? Pin
Miss_F3-Feb-08 20:38
Miss_F3-Feb-08 20:38 
AnswerRe: how to devide the client rect of frame window? Pin
Cedric Moonen3-Feb-08 21:01
Cedric Moonen3-Feb-08 21:01 
GeneralRe: how to devide the client rect of frame window? Pin
Miss_F3-Feb-08 22:30
Miss_F3-Feb-08 22:30 
AnswerRe: how to devide the client rect of frame window? Pin
CString(0xcccccccc)4-Feb-08 4:11
CString(0xcccccccc)4-Feb-08 4:11 
QuestionToolbar height Pin
nitin33-Feb-08 19:29
nitin33-Feb-08 19:29 
GeneralRe: Toolbar height Pin
Rajkumar R3-Feb-08 20:25
Rajkumar R3-Feb-08 20:25 
GeneralThe Bidirectional Algorithm Pin
zon_cpp3-Feb-08 18:56
zon_cpp3-Feb-08 18:56 
Generalnon-pure virtual function in C++ interface Pin
George_George3-Feb-08 16:04
George_George3-Feb-08 16:04 
GeneralRe: non-pure virtual function in C++ interface Pin
Stephen Hewitt3-Feb-08 16:13
Stephen Hewitt3-Feb-08 16:13 
GeneralRe: non-pure virtual function in C++ interface Pin
George_George3-Feb-08 16:24
George_George3-Feb-08 16:24 

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.