Click here to Skip to main content
15,913,467 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How can i remove spaces in my database ? Pin
David Crow26-Sep-06 3:06
David Crow26-Sep-06 3:06 
QuestionAbout printer queue Pin
hsdok25-Sep-06 22:56
hsdok25-Sep-06 22:56 
QuestionRe: About printer queue Pin
David Crow26-Sep-06 3:08
David Crow26-Sep-06 3:08 
QuestionHow to correctly create a UNICODE tstring from a char[]? Pin
BarryOg25-Sep-06 22:56
BarryOg25-Sep-06 22:56 
AnswerRe: How to correctly create a UNICODE tstring from a char[]? Pin
Nibu babu thomas25-Sep-06 23:05
Nibu babu thomas25-Sep-06 23:05 
AnswerRe: How to correctly create a UNICODE tstring from a char[]? Pin
Steve S26-Sep-06 0:08
Steve S26-Sep-06 0:08 
GeneralRe: How to correctly create a UNICODE tstring from a char[]? Pin
BarryOg26-Sep-06 4:01
BarryOg26-Sep-06 4:01 
GeneralRe: How to correctly create a UNICODE tstring from a char[]? Pin
Steve S27-Sep-06 1:34
Steve S27-Sep-06 1:34 
Looking again at your example, you have #ifdef UNICODE to type the std::string you want, but then later on you use a char buffer and an explicit cast.
You could use a TCHAR buffer (and no cast), which would give you whatever the compile flags say you're using (UNICODE/wchar ANSI/char). That way you may not need to do conversions at all in many cases, or use conditional conversion for different builds.

Don't despair.
Getting to grips with UNICODE when all you've done before used simple char[] stuff takes time.

Use the debugger to examine memory (not just display strings) so that you can see whether what you have in various places is what you think you should have.

Steve S
Developer for hire

GeneralRe: How to correctly create a UNICODE tstring from a char[]? Pin
BarryOg29-Sep-06 3:37
BarryOg29-Sep-06 3:37 
QuestionThread + Serial communication? Pin
Sunshine Always25-Sep-06 22:50
Sunshine Always25-Sep-06 22:50 
AnswerRe: Thread + Serial communication? Pin
Roger Stoltz25-Sep-06 23:25
Roger Stoltz25-Sep-06 23:25 
QuestionFont problem Pin
mikobi25-Sep-06 22:36
mikobi25-Sep-06 22:36 
AnswerRe: Font problem Pin
Hamid_RT25-Sep-06 23:24
Hamid_RT25-Sep-06 23:24 
AnswerRe: Font problem Pin
Steve S26-Sep-06 0:01
Steve S26-Sep-06 0:01 
AnswerRe: Font problem Pin
mikobi26-Sep-06 20:40
mikobi26-Sep-06 20:40 
GeneralRe: Font problem Pin
Steve S27-Sep-06 1:40
Steve S27-Sep-06 1:40 
GeneralRe: Font problem Pin
mikobi28-Sep-06 0:30
mikobi28-Sep-06 0:30 
AnswerFont problem Pin
mikobi26-Sep-06 20:57
mikobi26-Sep-06 20:57 
QuestionProcess dependencies Pin
nmx_de25-Sep-06 21:46
nmx_de25-Sep-06 21:46 
AnswerRe: Process dependencies Pin
nutkase25-Sep-06 23:31
nutkase25-Sep-06 23:31 
GeneralRe: Process dependencies Pin
nmx_de25-Sep-06 23:47
nmx_de25-Sep-06 23:47 
GeneralRe: Process dependencies Pin
nutkase26-Sep-06 0:02
nutkase26-Sep-06 0:02 
AnswerRe: Process dependencies Pin
Hamid_RT25-Sep-06 23:39
Hamid_RT25-Sep-06 23:39 
GeneralRe: Process dependencies Pin
Waldermort25-Sep-06 23:52
Waldermort25-Sep-06 23:52 
GeneralRe: Process dependencies Pin
Hamid_RT26-Sep-06 3:34
Hamid_RT26-Sep-06 3:34 

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.