就I编写汉字输入方法安装程序问题,继续请教cytown!(100)(100分)

  • 主题发起人 主题发起人 songguolong
  • 开始时间 开始时间
S

songguolong

Unregistered / Unconfirmed
GUEST, unregistred user!
cytown先生:<br>&nbsp; &nbsp; 上次在本论坛中有幸讨得您一个用C语言编写的《自由拼音输入法》安装<br>程序,我将其反译成DELPHI语言,编译执行后,检查注册表中,该注册的<br>内容已经都注册上了,但是,在"控制面板/输入法"中填加<br>《自由拼音输入法》后,发现[属性]按钮变灰,所以不能使用。<br>&nbsp; &nbsp; 我做的步骤如下:<br>&nbsp; &nbsp; 1、首先将输入方法的文本文件:<br>[Description]<br>Name=自由拼音输入法<br>MaxCodes=4<br>MaxElement=2<br>UsedCodes=abcdefghijklmnopqrstuvwxyz<br>WildChar=/<br>NumRules=3<br>[Rule]<br>ca4=p11+p21+p31+p41<br>ce2=p11+p12+p21+p22<br>ce3=p11+p21+p31<br>[Text]<br>乙a<br>忆aa<br>... ... ...<br>编译成freepy.IME,并考到/widows/system/目录下<br>&nbsp; &nbsp; 2、运行您的程序<br>附带说明一点,该输入方法己经用附件中的输入方法程序生成过(大众码)<br>一切正常。<br><br>
 
听听先生怎么说
 
经过多次实验,cytown先生的程序是正确的。这个问题对我来说,好象<br>己经解决!谢谢cytown先生!<br>另外,当输入方法在注册表中一切登录好后,如何更新屏幕右下角的输<br>入法任务栏,使新装入的中文输入方法可被选择!<br><br>&nbsp;<br>
 
//以前的答案(忘了是谁的了)<br>procedure SetmyIme(ImeName:string);<br>var<br>&nbsp; I: Integer;<br>&nbsp; HandleToSet: HKL;<br>begin<br>&nbsp; if not SysLocale.FarEast then Exit;<br>&nbsp; if ImeName &lt;&gt; '' then<br>&nbsp; begin<br>&nbsp; &nbsp; if (AnsiCompareText(ImeName, Screen.DefaultIme) &lt;&gt; 0)<br>&nbsp; &nbsp; &nbsp; &nbsp; and (Screen.Imes.Count &lt;&gt; 0) then<br>&nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; HandleToSet := Screen.DefaultKbLayout;<br>&nbsp; &nbsp; &nbsp; I := Screen.Imes.IndexOf(ImeName);<br>&nbsp; &nbsp; &nbsp; if I &gt;= 0 then<br>&nbsp; &nbsp; &nbsp; &nbsp; HandleToSet := HKL(Screen.Imes.Objects);<br>&nbsp; &nbsp; &nbsp; ActivateKeyboardLayout(HandleToSet, KLF_ACTIVATE);<br>&nbsp; &nbsp; end;<br>&nbsp; end;<br>end;<br><br>procedure ResetmyIme(ImeName:string);<br>begin<br>&nbsp; if not SysLocale.FarEast then Exit;<br>&nbsp; if ImeName &lt;&gt; '' then<br>&nbsp; begin<br>&nbsp; &nbsp; if AnsiCompareText(ImeName, Screen.DefaultIme) &lt;&gt; 0 then<br>&nbsp; &nbsp; &nbsp; ActivateKeyboardLayout(Screen.DefaultKbLayout, KLF_ACTIVATE);<br>&nbsp; end;<br>end;<br><br><br>procedure TForm1.Button1Click(Sender: TObject);<br>begin<br>&nbsp; SetmyIme('微软拼音输入法');<br>end;<br><br>procedure TForm1.Button2Click(Sender: TObject);<br>begin<br>&nbsp; ResetmyIme('微软拼音输入法');<br>end;
 
hubdog的程序很好!<br>但现在的情况是这样:在执行完我的安装程序之后,屏幕右下角的输入方法<br>状态栏的弹出菜单中并没有我的输入方法,非要重新启动才有,这是怎么回<br>事,如何解决?<br>
 
试一下,通知windows注册表已经变化<br>procedure TForm1.Button1Click(Sender: TObject);<br>begin<br>&nbsp; SendMessage(HWND_BROADCAST,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WM_WININICHANGE,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LongInt(PChar('你注册表变化部分')));<br>end;<br>///或者发WM_SETTINGCHANGE消息
 
按:<br>&nbsp; SendMessage(HWND_BROADCAST,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WM_WININICHANGE,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LongInt(PChar'HKEY_LOCAL_MACHINE/System/CurrentControlSet/control/keyboard layouts')));<br>和<br>&nbsp; SendMessage(HWND_BROADCAST,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WM_WININICHANGE,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LongInt(PChar('HKEY_USERS/.Default/keyboard layout/preload')));<br>执行,无效啊!<br>是我的参数填得不对吗?<br>
 
没人回答吗?<br>
 
我在等待回答!<br>
 
songguolong:<br>&nbsp; &nbsp; 你好。可以把《自由拼音输入法》寄给我一份吗?<br>c或d都可以.<br>g622@263.net<br>g622
 
songguolong:<br>&nbsp; &nbsp; 你好。可以把《自由拼音输入法》寄给我一份吗?<br>c或d都可以.<br>g622@263.net<br>&nbsp;<br>
 
songguolong: <br>&nbsp; &nbsp;你好。我也想要一份《自由拼音输入法》,ok?<br>&nbsp;751219@263.net<br>
 
嘿嘿,不好意思,我也想看看《自由拼音输入法》,但非DELPHI的不要!谢谢!
 
songguolong:<br>&nbsp; &nbsp; Hello. Can you send a delphi copy of 'freepy input method' to me? Thank you <br>very much. Best wishes to you.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; yours jan
 
songguolong:<br>&nbsp; &nbsp; 你好,我也想要一份的delphi版的自由输入法,不知道您是否愿意割爱?<br>&nbsp; &nbsp; 我的信箱:xubaoqiang@china.com<br>&nbsp; &nbsp; 谢谢!
 
songguolong:<br><br>如果可以, 也可以將《自由拼音输入法》給小弟一份嗎?<br>最好是 Delphi 的版本.. tks
 
附加功能 &nbsp; 将问题提前 &nbsp; &nbsp;
 
songguolong:<br>&nbsp; &nbsp; 你好。<br>&nbsp; &nbsp; 可以可以将Delphi版的《自由拼音输入法》送小弟一份,不胜感激。<br>&nbsp; &nbsp; 我以前也曾缩写过输入法的安装程序但也遇到了问题问题是不能将输入法加入任务栏上的<br>输入法列表,希望我们共勉。<br>&nbsp; &nbsp; zzm3000@china.com
 
接受答案了.
 
后退
顶部