Unicode 程式編程 |
尚未結案
|
enter2004
初階會員 ![]() ![]() 發表:51 回覆:94 積分:34 註冊:2005-04-10 發送簡訊給我 |
|
RedSnow
版主 ![]() ![]() ![]() ![]() ![]() ![]() 發表:79 回覆:1322 積分:845 註冊:2003-12-15 發送簡訊給我 |
enter2004 您好: 不知道有沒有誤會您的意思?通常 WIN32 API 中有支援 Unicode 的函式 (由 WIN32 Help 的 Quick Info 可查知被查詢的函式是否有支援 Unicode?),實際上與習慣上都是以 "W" 字母結尾,例如呼叫支援 Unicode 的 GetWindowLong() 函式時,其實是呼叫了 GetWindowLongW(),諸如此類的函式可由相關表頭檔中的宣告得知其實際的函式名稱,例如 GetWindowLong 函式的宣告是在 winuser.h 檔案內,宣告資料如下:
WINUSERAPI LONG WINAPI GetWindowLongA( HWND hWnd, int nIndex); WINUSERAPI LONG WINAPI GetWindowLongW( HWND hWnd, int nIndex); #ifdef UNICODE #define GetWindowLong GetWindowLongW #else #define GetWindowLong GetWindowLongA #endif // !UNICODE因此程式中在呼叫 GetWindowLong() 這個函式時,如果定義了 UNICODE,那麼就會引入 GetWindowLongW(),否則就引入 GetWindowLongA(),如果您想寫死成直接呼叫支援 Unicode 的函式,那就在程式中寫成 GetWindowLongW() 即可,其它的類似函式也可使用相同方式來查看與使用,您參考看看吧。 7 天天敲鍵盤 v 時時按滑鼠 8 |
enter2004
初階會員 ![]() ![]() 發表:51 回覆:94 積分:34 註冊:2005-04-10 發送簡訊給我 |
|
RedSnow
版主 ![]() ![]() ![]() ![]() ![]() ![]() 發表:79 回覆:1322 積分:845 註冊:2003-12-15 發送簡訊給我 |
enter2004 您好: 我沒有嘗試過您所描述的動作,不過我猜想應該是行不通的,否則就不會有強調 "支援 Unicode" 的第三方元件出現了,或許您可以試試這些元件,提供一個免費 Unicode Controls 的網址如下,該元件支援 Delphi 5、Delphi 6+、BCB5、BCB6+,並且有 Source Code,不妨一試:
http://www.tntware.com/delphicontrols/unicode/
7 天天敲鍵盤 v 時時按滑鼠 8
|
enter2004
初階會員 ![]() ![]() 發表:51 回覆:94 積分:34 註冊:2005-04-10 發送簡訊給我 |
|
RedSnow
版主 ![]() ![]() ![]() ![]() ![]() ![]() 發表:79 回覆:1322 積分:845 註冊:2003-12-15 發送簡訊給我 |
enter2004 您好: 查看 "Tnt Delphi Unicode Controls" 這組套件的 Readme.txt 與 License.txt 兩個檔案後,並未找到明確針對商業用途的限制或要求,因此我到該套件發行站台去找尋,看看是否能找出一些相關資料?結果在它的討論區有人提出類似的問題,而作者的回覆如下:
Topic: License issues... (2 of 6), Read 104 times
Conf: tnt.delphi.unicode-controls.discussion
From: Troy Wolbrink troy.wolbrink@ccci.org
Date: Tuesday, March 16, 2004 10:40 PM I don't really have any formal license. Suffice it to say that these components are truly freeware. You can freely use my components in open source, freeware or commercial projects. I'd appreciate getting recognition in the credits of your app, but I don't require it. My source code can be redistributed also as long as I'm clearly given credit for my work (ie. just leave my unit headers). I'm not exactly sure what a "dual licensed project under GPL and a commercial license" looks like, but it all sounds good to me. :^) --Troy
由上述以紅色標示的部份來看,您應該是可以免費的將它用在商業軟體上,不過我個人建議您如果該套件有幫您賺到銀子的話,您不妨也贊助一下該套件的作者。 7 天天敲鍵盤 v 時時按滑鼠 8
|
enter2004
初階會員 ![]() ![]() 發表:51 回覆:94 積分:34 註冊:2005-04-10 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |