随笔 - 4  文章 - 0 评论 - 0 
<2017年5月>
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

Since 2006/06/22Free Hit Counter
转载须经本人同意
Gold Price per Gram in China Yuan Renminbi

常用链接

留言簿(1)

随笔分类

随笔档案

搜索

  •  

最新评论

阅读排行榜

评论排行榜

Technorati 标签:

和一个朋友聊天谈起,说起他们项目的一个需求,应用程序中不想弹出输入法窗口。结果一搜就搜到了,微软的支持站点就有。特此摘录下来,已备将来需要。

How to disable IME for a particular window

In the East Asian versions of Windows 95 and Windows NT 4.0, applications can call ImmAssociateContext() to disable IME for a certain window. Windows 95 and Windows 4.0 now have a new East Asian Common API Specification that enables this to would work for the Chinese, Japanese, and Korean versions of Windows 95 and Windows NT 4.0.

Sample code
To disable IME for a certain window, an application can call ImmAssociateContext() API as shown below:
HIMC hIMC;
hIMC = ImmAssociateContext(hWnd, NULL);
// It makes IME disable for hWnd window.
// Then you can do whatever you want without IME.


ImmAssociateContext(hWnd, hIMC);
// If you want to enable IME again,
//then you can use the previous stored IME
// context(hIMC) to restore IME.

This method will not work on Windows 3.1 and Windows NT 3.5. You can use WinnlsEnableIME()for these systems, but this function will enable/disable the whole system IME, not just for a specific window.
The reason ImmAssociateContext() does not work on Windows NT 3.51 is that when Microsoft was developing new IMM functions, Windows NT 3.51 was already released with old functionality. Windows NT 3.5 and 3.51 still use Windows 3.1 style IME API like WinnlsEnableIME and SendIMEMessageEx. But, Windows NT 4.0 adapted Windows 95's IME API so that Windows NT 4.0 has the same set of IME API with Windows 95.

希望能给阅读此文的朋友带来帮助。

posted @ 2008-01-27 16:45 cooleaf 阅读(519) | 评论 (0)编辑 收藏

Technorati 标签: , ,

 

修改/etc/inittab文件。将id:5:initdefault: 中的5修改为3,表示不进入X界面。

反之亦然。

posted @ 2007-10-16 18:41 cooleaf 阅读(194) | 评论 (0)编辑 收藏
     摘要: 本文描述了组播编程的大致方式,没有涉及到具体代码。  阅读全文
posted @ 2007-10-10 17:01 cooleaf 阅读(238) | 评论 (0)编辑 收藏
     摘要: 本文描述了Fedora Core 4 下Samba服务器的配置过程以及一些需要注意的地方。  阅读全文
posted @ 2007-10-10 16:56 cooleaf 阅读(150) | 评论 (0)编辑 收藏
仅列出标题