Article View: borland.public.cppbuilder.nativeapi
Article #2563Re: Getting Message with WinMain
From: Alan Bellingham
Date: Wed, 14 Feb 2007 10:12
Date: Wed, 14 Feb 2007 10:12
25 lines
2305 bytes
2305 bytes
"Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> wrote: >Using 'L' forces the compiler to generate the string literal as a >wchar_t* string. Using the TEXT() or _T() macros instead allows the >string literal to be either char* or wchar_t* depending on whether the >project is compiled for Unicode or not. Same with the TCHAR and >LPTSTR macros - they map to either char or wchar_t accordingly as >well. That is the portability that I was referring to earlier. IMAO, this portability is a false god - it clutters up your source code with all sorts of junk for no benefit. Far better just to write it for Unicode. Or if Unicode is inappropriate, then write it for 'Ansi' (MBCS). Trying to write for both, though, is a mess. (Yes, I'm currently stripping all this crud out of my source code - how did you guess? I'd love for the standard to support a compiler flag so that even the L"" wasn't required (perhaps needing S"" instead for octet char strings)). Your opinion is obviously different. Alan Bellingham -- 10th Anniversary ACCU Conference: 11-14 April 2007 - Oxford, UK (Booking now open: see http://accu.org/index.php/conferences for details)
Technical Details
Message-ID:
<4rn5t2h81tkf5pev5otv3pip3rk5b5c2qr@4ax.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<45d0cc1f@newsgroups.borland.com> <45d0cf87$1@newsgroups.borland.com> <45d0ea45$1@newsgroups.borland.com> <45d0f730$1@newsgroups.borland.com> <45d1f7ef@newsgroups.borland.com> <45d1fb3e$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,ece89f4506d844ba X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: Alan Bellingham <alan@lspace.org> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Getting Message with WinMain Date: Wed, 14 Feb 2007 10:12:29 +0000 Organization: Private Reply-To: alan@lspace.org Message-ID: <4rn5t2h81tkf5pev5otv3pip3rk5b5c2qr@4ax.com> References: <45d0cc1f@newsgroups.borland.com> <45d0cf87$1@newsgroups.borland.com> <45d0ea45$1@newsgroups.borland.com> <45d0f730$1@newsgroups.borland.com> <45d1f7ef@newsgroups.borland.com> <45d1fb3e$1@newsgroups.borland.com> X-Newsreader: Forte Agent 4.1/32.1088 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 193.129.251.253 X-Trace: newsgroups.borland.com 1171447930 193.129.251.253 (14 Feb 2007 02:12:10 -0800) Lines: 25 Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail