久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

TCHAR 仍然相關嗎?

Is TCHAR still relevant?(TCHAR 仍然相關嗎?)
本文介紹了TCHAR 仍然相關嗎?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我是 Windows 編程的新手,在閱讀了 Petzold 的書后,我想知道:

I'm new to Windows programming and after reading the Petzold book I wonder:

使用 TCHAR 類型和 _T() 函數來聲明字符串還是我應該只使用 wchar_t 函數的好習慣> 和 L"" 字符串在新代碼中?

is it still good practice to use the TCHAR type and the _T() function to declare strings or if I should just use the wchar_t and L"" strings in new code?

我將只針對 Windows 2000 及更高版本,并且我的代碼從一開始就是 i18n.

I will target only Windows 2000 and up and my code will be i18n from the start up.

推薦答案

如果我今天在做一個新項目,我仍然會使用 TCHAR 語法.使用它和 WCHAR 語法之間沒有太大的實際區別,我更喜歡明確字符類型的代碼.由于大多數 API 函數和輔助對象采用/使用 TCHAR 類型(例如:CString),因此使用它才有意義.此外,如果您決定在某個時候在 ASCII 應用程序中使用代碼,或者如果 Windows 演變為 Unicode32 等,它會為您提供靈活性.

I would still use the TCHAR syntax if I was doing a new project today. There's not much practical difference between using it and the WCHAR syntax, and I prefer code which is explicit in what the character type is. Since most API functions and helper objects take/use TCHAR types (e.g.: CString), it just makes sense to use it. Plus it gives you flexibility if you decide to use the code in an ASCII app at some point, or if Windows ever evolves to Unicode32, etc.

如果你決定走 WCHAR 路線,我會明確說明這一點.即,使用 CStringW 代替 CString,并在轉換為 TCHAR 時轉換宏(例如:CW2CT).

If you decide to go the WCHAR route, I would be explicit about it. That is, use CStringW instead of CString, and casting macros when converting to TCHAR (eg: CW2CT).

無論如何,這就是我的看法.

That's my opinion, anyway.

這篇關于TCHAR 仍然相關嗎?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Algorithm to convert RGB to HSV and HSV to RGB in range 0-255 for both(將 RGB 轉換為 HSV 并將 HSV 轉換為 RGB 的算法,范圍為 0-255)
How to convert an enum type variable to a string?(如何將枚舉類型變量轉換為字符串?)
When to use inline function and when not to use it?(什么時候使用內聯函數,什么時候不使用?)
Examples of good gotos in C or C++(C 或 C++ 中好的 goto 示例)
Significance of ios_base::sync_with_stdio(false); cin.tie(NULL);(ios_base::sync_with_stdio(false) 的意義;cin.tie(NULL);)
C99 stdint.h header and MS Visual Studio(C99 stdint.h 頭文件和 MS Visual Studio)
主站蜘蛛池模板: 国产精品一区在线观看 | 亚洲网站在线观看 | 国产探花在线精品一区二区 | 欧日韩在线 | 国产精品视频网 | 日韩在线一区二区三区 | 国产99久久久国产精品 | 国产综合久久 | 成人免费看电影 | 亚洲精品视频二区 | 久久国产成人 | 久久久国产精品 | 久久久在线视频 | 日韩av在线一区二区三区 | 欧美视频在线观看 | 婷婷久久综合 | 欧美日韩国产精品一区二区 | 欧美日韩免费一区二区三区 | 999精品在线 | 成人av网站在线观看 | 男人天堂手机在线视频 | a免费视频| 国产情侣激情 | 欧美大片一区 | 精品免费国产视频 | 国产精品福利久久久 | 成人免费小视频 | 亚洲成人免费av | 亚洲视频免费在线观看 | 一区二区在线免费播放 | 五月天国产视频 | 国产免费又色又爽又黄在线观看 | 久久久久国产一区二区三区 | 一区二区三区高清 | 色久五月 | 中文精品视频 | hsck成人网 | 欧美1区| 午夜视频免费在线观看 | 国产乱人伦精品一区二区 | 成年人在线观看 |