Click here to Skip to main content
15,885,216 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How do I use std::stringstream to printf "%02d" Pin
Gwenio8-Apr-10 18:38
Gwenio8-Apr-10 18:38 
QuestionHow to use a Dialog Template as an item in another Dialog. Pin
Bram van Kampen8-Apr-10 15:06
Bram van Kampen8-Apr-10 15:06 
AnswerRe: How to use a Dialog Template as an item in another Dialog. Pin
cmk8-Apr-10 15:53
cmk8-Apr-10 15:53 
QuestionLPWSTR / Win32 Pin
Fareed Rizkalla8-Apr-10 7:10
Fareed Rizkalla8-Apr-10 7:10 
AnswerRe: LPWSTR / Win32 Pin
PJ Arends8-Apr-10 7:47
professionalPJ Arends8-Apr-10 7:47 
AnswerRe: LPWSTR / Win32 Pin
CPallini8-Apr-10 9:43
mveCPallini8-Apr-10 9:43 
AnswerRe: LPWSTR / Win32 Pin
Joe Woodbury8-Apr-10 10:57
professionalJoe Woodbury8-Apr-10 10:57 
GeneralRe: LPWSTR / Win32 Pin
Emilio Garavaglia8-Apr-10 21:15
Emilio Garavaglia8-Apr-10 21:15 
Joe Woodbury wrote:
'W' doesn't need to be L'W' since it will auto-promote to wchar_t.


That should not be true.
It was true with old C++ version, where the wchar_t was not an independent type, and was just a typedef for "unsigned short", and "char" autopromote into "short" and become "unsigned".

In more modern versions, wchar_t can be set up as an independent type with a compiler switch and -now- it becomes a default by standard.

Autopromotion of char-s into wchar-t must not happen, since the "encoding scheme" used in strings may not fit: All negative chars (above 127) are not ASCII and hence may have different meaning if ANSI (depending on the codepage) or UTF (can be UTF-8).
That said, char to wchar_t is not a one-to-one arithmetic conversion. You may have four chars going into a single or a pair of wchar_t (think to UTF-8 to UTF-16 chinese).

2 bugs found.
> recompile ...
65534 bugs found.
D'Oh! | :doh:


GeneralRe: LPWSTR / Win32 Pin
CPallini8-Apr-10 21:24
mveCPallini8-Apr-10 21:24 
GeneralRe: LPWSTR / Win32 Pin
Emilio Garavaglia8-Apr-10 21:42
Emilio Garavaglia8-Apr-10 21:42 
GeneralRe: LPWSTR / Win32 Pin
CPallini8-Apr-10 21:57
mveCPallini8-Apr-10 21:57 
GeneralRe: LPWSTR / Win32 Pin
Fareed Rizkalla8-Apr-10 22:26
Fareed Rizkalla8-Apr-10 22:26 
GeneralRe: LPWSTR / Win32 Pin
Eugen Podsypalnikov8-Apr-10 23:09
Eugen Podsypalnikov8-Apr-10 23:09 
GeneralRe: LPWSTR / Win32 Pin
Fareed Rizkalla8-Apr-10 23:25
Fareed Rizkalla8-Apr-10 23:25 
GeneralRe: LPWSTR / Win32 Pin
Eugen Podsypalnikov8-Apr-10 23:32
Eugen Podsypalnikov8-Apr-10 23:32 
GeneralRe: LPWSTR / Win32 Pin
Fareed Rizkalla9-Apr-10 13:32
Fareed Rizkalla9-Apr-10 13:32 
GeneralRe: LPWSTR / Win32 Pin
Joe Woodbury9-Apr-10 5:38
professionalJoe Woodbury9-Apr-10 5:38 
Questionhow to use multiThread to read and write database? Pin
caiguosen8-Apr-10 5:47
caiguosen8-Apr-10 5:47 
AnswerRe: how to use multiThread to read and write database? Pin
CPallini8-Apr-10 9:38
mveCPallini8-Apr-10 9:38 
QuestionRe: how to use multiThread to read and write database? Pin
David Crow9-Apr-10 3:21
David Crow9-Apr-10 3:21 
AnswerRe: how to use multiThread to read and write database? Pin
caiguosen10-Apr-10 1:42
caiguosen10-Apr-10 1:42 
QuestionRe: how to use multiThread to read and write database? Pin
David Crow12-Apr-10 2:51
David Crow12-Apr-10 2:51 
Questionhow to properly display buttons over an image Pin
genush8-Apr-10 5:38
genush8-Apr-10 5:38 
AnswerRe: how to properly display buttons over an image Pin
Fareed Rizkalla8-Apr-10 7:23
Fareed Rizkalla8-Apr-10 7:23 
GeneralRe: how to properly display buttons over an image Pin
genush8-Apr-10 11:50
genush8-Apr-10 11:50 

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.