Click here to Skip to main content
15,902,835 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionOverriding the maximize button for the main window in a MDI application Pin
berger_the_great7-May-08 5:00
berger_the_great7-May-08 5:00 
AnswerRe: Overriding the maximize button for the main window in a MDI application Pin
Randor 7-May-08 6:00
professional Randor 7-May-08 6:00 
GeneralRe: Overriding the maximize button for the main window in a MDI application Pin
berger_the_great9-May-08 5:16
berger_the_great9-May-08 5:16 
QuestionHow to Get a TCHAR into a CString? Pin
Larry Mills Sr7-May-08 4:48
Larry Mills Sr7-May-08 4:48 
AnswerRe: How to Get a TCHAR into a CString? Pin
toxcct7-May-08 4:54
toxcct7-May-08 4:54 
AnswerRe: How to Get a TCHAR into a CString? Pin
CPallini7-May-08 5:06
mveCPallini7-May-08 5:06 
QuestionRe: How to Get a TCHAR into a CString? Pin
David Crow7-May-08 5:26
David Crow7-May-08 5:26 
AnswerRe: How to Get a TCHAR into a CString? Pin
Randor 7-May-08 5:41
professional Randor 7-May-08 5:41 
Larry Mills Sr wrote:
BUT it is not a TCHAR. How do I make it into a TCHAR?


Hello Larry,

You seem to reiterate the same questions regarding TCHAR which implies that you may be confused about the subject. First thing you should know is that technically there is no such thing as a TCHAR. TCHAR simply means "Template Character" and is simply a wrapper definition for both wchar_t and char based on whether or not UNICODE is defined. In other words if UNICODE is defined then TCHAR=wchar_t otherwise its a char.

All you need to do is enable unicode support in your project and CString will default to CStringW and TCHAR will default to wchar_t. Thats all you need to do. There are some functions which may require you to convert the wchar_t to multi-byte and if you run into these types of functions you can use my previous answer to convert the wchar_t to char[^].

Best Wishes,
-David Delaune
AnswerRe: How to Get a TCHAR into a CString? Pin
Mark Salsbery7-May-08 6:52
Mark Salsbery7-May-08 6:52 
GeneralRe: How to Get a TCHAR into a CString? Pin
Larry Mills Sr7-May-08 7:34
Larry Mills Sr7-May-08 7:34 
GeneralRe: How to Get a TCHAR into a CString? Pin
CPallini7-May-08 7:42
mveCPallini7-May-08 7:42 
GeneralRe: How to Get a TCHAR into a CString? Pin
Mark Salsbery7-May-08 7:53
Mark Salsbery7-May-08 7:53 
GeneralRe: How to Get a TCHAR into a CString? Pin
Larry Mills Sr7-May-08 10:56
Larry Mills Sr7-May-08 10:56 
GeneralRe: How to Get a TCHAR into a CString? Pin
Mark Salsbery7-May-08 11:13
Mark Salsbery7-May-08 11:13 
GeneralRe: How to Get a TCHAR into a CString? Pin
Larry Mills Sr7-May-08 12:37
Larry Mills Sr7-May-08 12:37 
GeneralRe: How to Get a TCHAR into a CString? Pin
Mark Salsbery9-May-08 7:36
Mark Salsbery9-May-08 7:36 
AnswerRe: How to Get a TCHAR into a CString? Pin
Mark Salsbery9-May-08 7:47
Mark Salsbery9-May-08 7:47 
GeneralRe: How to Get a TCHAR into a CString? Pin
Larry Mills Sr9-May-08 16:05
Larry Mills Sr9-May-08 16:05 
QuestionToolbar in dialog based project Pin
ilgale7-May-08 4:28
ilgale7-May-08 4:28 
AnswerRe: Toolbar in dialog based project Pin
Mark Salsbery7-May-08 7:01
Mark Salsbery7-May-08 7:01 
QuestionCapturing a video using opencv on MFC Pin
Collin Xie7-May-08 4:18
Collin Xie7-May-08 4:18 
AnswerRe: Capturing a video using opencv on MFC Pin
srisuwan917-Jan-10 20:56
srisuwan917-Jan-10 20:56 
QuestionMFC Application and Web service Pin
BadJerry7-May-08 4:05
BadJerry7-May-08 4:05 
AnswerRe: MFC Application and Web service Pin
led mike7-May-08 4:28
led mike7-May-08 4:28 
GeneralRe: MFC Application and Web service Pin
BadJerry7-May-08 4:40
BadJerry7-May-08 4:40 

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.