Click here to Skip to main content
16,007,443 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Advice Required Pin
roboo24-Nov-02 18:11
roboo24-Nov-02 18:11 
GeneralHooks: Global Pin
keravon23-Nov-02 17:00
keravon23-Nov-02 17:00 
Generalfonts Pin
kjessee23-Nov-02 14:19
kjessee23-Nov-02 14:19 
GeneralRe: fonts Pin
kjessee24-Nov-02 16:31
kjessee24-Nov-02 16:31 
Questionchar, wchar, TCHAR, BYTE ??? Pin
Matt Gullett23-Nov-02 14:03
Matt Gullett23-Nov-02 14:03 
AnswerRe: char, wchar, TCHAR, BYTE ??? Pin
Michael Dunn23-Nov-02 15:08
sitebuilderMichael Dunn23-Nov-02 15:08 
GeneralRe: char, wchar, TCHAR, BYTE ??? Pin
Matt Gullett23-Nov-02 15:29
Matt Gullett23-Nov-02 15:29 
GeneralRe: char, wchar, TCHAR, BYTE ??? Pin
Michael Dunn23-Nov-02 18:18
sitebuilderMichael Dunn23-Nov-02 18:18 
Matt Gullett wrote:
(Love your articles)

Thanks Smile | :)

Matt Gullett wrote:
Is 1 enough in these situations or should I really be using sizeof(TCHAR)?

What you have is right. In the code I gave earlier, you aren't adding 1, you're adding 1*sizeof(TCHAR), which is 2 in Unicode builds. The terminating zero in a Unicode string is 2 bytes, the same size as the other characters.
So if you have the Unicode string L"Bob", the byte length is (1+_tcslen(L"Bob"))*sizeof(TCHAR) => (1+3)*2 => 8

--Mike--
Thing #9 to say when mad at work: "Therapy is expensive. Popping bubble plastic is cheap. You choose."
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm

AnswerRe: char, wchar, TCHAR, BYTE ??? Pin
includeh1024-Nov-02 6:23
includeh1024-Nov-02 6:23 
GeneralQuestion about float format Pin
rsasalm_23-Nov-02 10:21
rsasalm_23-Nov-02 10:21 
GeneralRe: Question about float format Pin
Chris Losinger23-Nov-02 10:37
professionalChris Losinger23-Nov-02 10:37 
GeneralRe: Question about float format Pin
Michael Dunn23-Nov-02 15:10
sitebuilderMichael Dunn23-Nov-02 15:10 
QuestionSMTP Gateway ?? Pin
Muslima23-Nov-02 8:54
Muslima23-Nov-02 8:54 
Generalto owner of the site, in the 3 monthes .... Pin
includeh1023-Nov-02 8:47
includeh1023-Nov-02 8:47 
GeneralRe: to owner of the site, in the 3 monthes .... Pin
Chris Losinger23-Nov-02 9:58
professionalChris Losinger23-Nov-02 9:58 
GeneralRe: to owner of the site, in the 3 monthes .... Pin
Michael P Butler23-Nov-02 10:37
Michael P Butler23-Nov-02 10:37 
GeneralRe: to owner of the site, in the 3 monthes .... Pin
kjessee23-Nov-02 11:29
kjessee23-Nov-02 11:29 
GeneralRe: to owner of the site, in the 3 monthes .... Pin
Christian Graus23-Nov-02 21:35
protectorChristian Graus23-Nov-02 21:35 
GeneralRe: to owner of the site, in the 3 monthes .... Pin
Stephane Rodriguez.24-Nov-02 6:08
Stephane Rodriguez.24-Nov-02 6:08 
GeneralRe: to owner of the site, in the 3 monthes .... Pin
Christian Graus24-Nov-02 15:13
protectorChristian Graus24-Nov-02 15:13 
GeneralBMP -> JPG, once more - no mfc. Pin
int01h23-Nov-02 8:46
int01h23-Nov-02 8:46 
GeneralRe: BMP -> JPG, once more - no mfc. Pin
Chris Losinger23-Nov-02 9:57
professionalChris Losinger23-Nov-02 9:57 
GeneralWindow closing Pin
S O S23-Nov-02 5:47
S O S23-Nov-02 5:47 
GeneralRe: Window closing Pin
Michael Dunn23-Nov-02 6:33
sitebuilderMichael Dunn23-Nov-02 6:33 
GeneralRe: Window closing Pin
Paul M Watt23-Nov-02 6:45
mentorPaul M Watt23-Nov-02 6:45 

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.