在 Vista 底下, 如何以程式切換輸入法 ? |
答題得分者是:william
|
boson
中階會員 發表:74 回覆:155 積分:85 註冊:2004-07-31 發送簡訊給我 |
|
boson
中階會員 發表:74 回覆:155 積分:85 註冊:2004-07-31 發送簡訊給我 |
找到了一點線索, 可惜不是 for Delphi 的, 而是 C# 的解法 :
http://www.microsoft.com/taiwan/msdn/columns/huang_jhong_cheng/vista.htm 有沒有人能幫忙改寫成 Delphi ?
編輯記錄
boson 重新編輯於 2007-05-18 20:44:29, 註解 無‧
|
暗黑破壞神
版主 發表:9 回覆:2301 積分:1627 註冊:2004-10-04 發送簡訊給我 |
|
william
版主 發表:66 回覆:2535 積分:3048 註冊:2002-07-11 發送簡訊給我 |
被騙了
從 MSDN 上翻譯過來, 希望有幫助啦. type PF_LANGUAGEPROFILE = ^TF_LANGUAGEPROFILE; TF_LANGUAGEPROFILE = packed record clsid: TGUID; langid: smallint; catid: TGUID; fActive: WordBool; guidProfile: TGUID; end; IEnumGUID = interface ['{0002E000-0000-0000-C000-000000000046}'] function Next(celt: Cardinal; out rgelt: TGUID; out pcFetched: Cardinal): HRESULT; stdcall; function Skip(celt: Cardinal): HRESULT; stdcall; function Reset: HRESULT; stdcall; function Clone(out ppEnum: IEnumGUID): HRESULT; stdcall; end; IEnumTfLanguageProfiles = interface ['{3D61BF11-AC5F-42C8-A4CB-931BCC28C744}'] function Clone(out ppEnum: IEnumTfLanguageProfiles): HRESULT; stdcall; function Next(ulCount: Cardinal; const pProfile: PF_LANGUAGEPROFILE; out pcFetch: Cardinal): HRESULT; stdcall; function Reset: HRESULT; stdcall; function Skip(ulCount: Cardinal): HRESULT; stdcall; end; ITfInputProcessorProfiles = interface ['{1F02B6C5-7842-4EE6-8A0B-9A24183A95CA}'] function Register(const clsid: TGUID): HRESULT; stdcall; function Unregister(const clsid: TGUID): HRESULT; stdcall; function AddLanguageProfile(const clsid: TGUID; langid: smallint; const guidProfile: TGUID; const pchDesc: WideString; cchDesc: Cardinal; const pchIconFile: WideString; cchFile, uIconIndex: Cardinal): HRESULT; stdcall; function RemoveLanguageProfile(const clsid: TGUID; langid: smallint; out guidProfile: TGUID): HRESULT; stdcall; function EnumInputProcessorInfo(out ppEnum: IEnumGUID): HRESULT; stdcall; function GetDefaultLanguageProfile(langid: smallint; const catid: TGUID; out clsid: TGUID; out guidProfile: TGUID): HRESULT; stdcall; function SetDefaultLanguageProfile(langid: smallint; const clsid: TGUID; const guidProfile: TGUID): HRESULT; stdcall; function ActivateLanguageProfile(const clsid: TGUID; langid: smallint; const guidProfiles: TGUID): HRESULT; stdcall; function GetActiveLanguageProfile(const clsid: TGUID; out langid: smallint; out guidProfile: TGUID): HRESULT; stdcall; function GetLanguageProfileDescription(const clsid: TGUID; langid: smallint; const guidProfile: TGUID; out pbstrProfile: WideString): HRESULT; stdcall; function GetCurrentLanguage(out langid: smallint): HRESULT; stdcall; function ChangeCurrentLanguage(langid: smallint): HRESULT; stdcall; function GetLanguageList(out ppLangId: pointer; out ulCount: Cardinal): HRESULT; stdcall; function EnumLanguageProfiles(langid: smallint; out ppEnum: IEnumTfLanguageProfiles): HRESULT; stdcall; function EnableLanguageProfile(const clsid: TGUID; langid: smallint; const guidProfile: TGUID; fEnable: WordBool): HRESULT; stdcall; function IsEnabledLanguageProfile(const clsid: TGUID; langid: smallint; const guidProfile: TGUID; out fEnabled: WordBool): HRESULT; stdcall; function EnableLanguageProfileByDefault(const clsid: TGUID; langid: smallint; const guidProfile: TGUID; fEnabled: WordBool): HRESULT; stdcall; function SubstituteKeyboardLayout(const clsid: TGUID; langid: smallint; const guidProfile: TGUID; hKL: pointer): HRESULT; stdcall; end; function TF_CreateInputProcessorProfiles(out profiles: ITfInputProcessorProfiles): HRESULT; stdcall; external 'msctf.dll'; |
a0
一般會員 發表:11 回覆:29 積分:18 註冊:2003-09-12 發送簡訊給我 |
感謝 william大的翻譯
IEnumTfLanguageProfiles = interface ['{3D61BF11-AC5F-42C8-A4CB-931BCC28C744}'] function Next(ulCount: Cardinal; const pProfile: PF_LANGUAGEPROFILE; out pcFetch: Cardinal): HRESULT; stdcall; MSDN 上寫說 HRESULT Next( ULONG ulCount<!---->, TF_LANGUAGEPROFILE* pProfile<!---->, ULONG* pcFetch<!----> ); Parameters
|
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |