Click here to Skip to main content
15,949,686 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Write Formated Data to STL-String Pin
Rob Caldecott20-Sep-06 22:34
Rob Caldecott20-Sep-06 22:34 
Questionmouse click Pin
viliam20-Sep-06 20:23
viliam20-Sep-06 20:23 
AnswerRe: mouse click Pin
Christian Graus20-Sep-06 20:26
protectorChristian Graus20-Sep-06 20:26 
GeneralRe: mouse click Pin
viliam20-Sep-06 20:32
viliam20-Sep-06 20:32 
GeneralRe: mouse click Pin
Christian Graus20-Sep-06 20:34
protectorChristian Graus20-Sep-06 20:34 
AnswerRe: mouse click Pin
Nibu babu thomas20-Sep-06 20:28
Nibu babu thomas20-Sep-06 20:28 
QuestionConverting : String to Unicode Pin
Mohammad Rastkar20-Sep-06 19:46
Mohammad Rastkar20-Sep-06 19:46 
AnswerRe: Converting : String to Unicode Pin
Nibu babu thomas20-Sep-06 19:51
Nibu babu thomas20-Sep-06 19:51 
Mohammad Rastkar wrote:
For converting 'LPTSTR' to 'wchar_t *', we can use '_T()', Example :
MessageBox(_T("Some UniCode characters"));

Is there another way ? ... because I have wrote a long code and adding _T() to all strings is a little difficult!


Just add an L before the string. But then this is hard coding, and will cause problems in ANSI builds. It won't cause any problem if you are assigning directly to a LPCWSTR etc, but will cause problems if you are trying to use TCHAR versions like LPCTSTR.

For eg:

LPC<code>W</code>STR pBlahString =  <code>L</code>"Blah Long string Blah Long string Blah Long string Blah Long string Blah Long string 
Blah Long string Blah Long string Blah Long string Blah Long string Blah Long string Blah Long string Blah Long string 
Blah Long string Blah Long string Blah Long string Blah Long string Blah Long string";



Nibu thomas
A Developer

Programming tips[^]  My site[^]

QuestionNice answer, But ... Pin
Mohammad Rastkar20-Sep-06 20:21
Mohammad Rastkar20-Sep-06 20:21 
AnswerRe: Nice answer But ... Pin
Nibu babu thomas20-Sep-06 20:21
Nibu babu thomas20-Sep-06 20:21 
AnswerRe: Converting : String to Unicode Pin
Christian Graus20-Sep-06 20:25
protectorChristian Graus20-Sep-06 20:25 
GeneralRe: Converting : String to Unicode Pin
Nibu babu thomas20-Sep-06 20:33
Nibu babu thomas20-Sep-06 20:33 
AnswerRe: Converting : String to Unicode Pin
Haroon Sarwar20-Sep-06 20:32
Haroon Sarwar20-Sep-06 20:32 
QuestionRestirct resizing at run time..... Pin
kiranin20-Sep-06 19:38
kiranin20-Sep-06 19:38 
AnswerRe: Restirct resizing at run time..... Pin
Nibu babu thomas20-Sep-06 19:42
Nibu babu thomas20-Sep-06 19:42 
GeneralRe: Restirct resizing at run time..... Pin
kiranin20-Sep-06 20:05
kiranin20-Sep-06 20:05 
GeneralRe: Restirct resizing at run time..... Pin
Nibu babu thomas20-Sep-06 20:14
Nibu babu thomas20-Sep-06 20:14 
GeneralRe: Restirct resizing at run time..... Pin
kiranin20-Sep-06 20:54
kiranin20-Sep-06 20:54 
Questionproblem with txt file [modified] Pin
With_problem20-Sep-06 19:02
With_problem20-Sep-06 19:02 
AnswerRe: problem with txt file Pin
David Crow21-Sep-06 3:52
David Crow21-Sep-06 3:52 
QuestionHow can i know ( in MFC ) that some dialog window is open now ? Pin
Yanshof20-Sep-06 18:54
Yanshof20-Sep-06 18:54 
AnswerRe: How can i know ( in MFC ) that some dialog window is open now ? Pin
Naveen20-Sep-06 18:56
Naveen20-Sep-06 18:56 
AnswerRe: How can i know ( in MFC ) that some dialog window is open now ? Pin
Rinu_Raj20-Sep-06 18:59
Rinu_Raj20-Sep-06 18:59 
AnswerRe: How can i know ( in MFC ) that some dialog window is open now ? Pin
Nibu babu thomas20-Sep-06 19:49
Nibu babu thomas20-Sep-06 19:49 
QuestionRe: How can i know ( in MFC ) that some dialog window is open now ? Pin
David Crow21-Sep-06 3:55
David Crow21-Sep-06 3:55 

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.