WM_IME_NOTIFY 的使用方法

zhouxingyu896 2010-08-04 11:34:28
那位高手指导下
WM_IME_NOTIFY 的使用方法

怎么获取到当前使用的输入法
...全文
762 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
赵4老师 2010-08-05
  • 打赏
  • 举报
回复
bobo364 2010-08-05
  • 打赏
  • 举报
回复
学习,进来接分
jixingzhong 2010-08-05
  • 打赏
  • 举报
回复
参考一下前人经验:
http://blog.csdn.net/panstrgh/archive/2007/07/23/1703199.aspx
jixingzhong 2010-08-05
  • 打赏
  • 举报
回复
Platform Builder for Microsoft Windows CE 5.0
WM_IME_NOTIFY
This message is sent to an application to notify it of changes to the IME window. An application processes this message if it is responsible for managing the IME window.

CopyWM_IME_NOTIFY
dwCommand = (DWORD) wParam;
dwData = (DWORD) lParam;
Parameters
dwCommand
Command value. The following table shows the values this parameter can take.
Value Description
IMN_CHANGECANDIDATE This message is sent when an IME is about to change the content of a candidate window. An application then processes this message to display the candidate window itself.
IMN_CLOSECANDIDATE This message is sent to the application when an IME is about to close the candidate window.
IMN_CLOSESTATUSWINDOW This message is sent to the application when an input method editor (IME) is about to close the status window.
IMN_GUIDELINE This message is sent when an IME is about to show an error or information.
IMN_OPENCANDIDATE This message is sent to the application when an IME is about to open the candidate window.
IMN_OPENSTATUSWINDOW This message is sent when an IME is about to create the status window.
IMN_SETCANDIDATEPOS This message is sent when the IME is about to move the candidate window.
IMN_SETCOMPOSITIONFONT This message is sent when the font of the input context is updated.
IMN_SETCOMPOSITIONWINDOW This message is sent when the composition form of the input context is updated.
IMN_SETCONVERSIONMODE This message is sent when the conversion mode of the Input Context is updated.
IMN_SETOPENSTATUS This message is sent when the open status of the input context is updated.
IMN_SETSENTENCEMODE This message is sent when the sentence mode of the input context is updated.
IMN_SETSTATUSWINDOWPOS This message is sent when the status window position in the input context is updated.

dwData
Command-specific value.
消息,就是指Windows发出的一个通知,告诉应用程序某个事情发生了。例如,单击鼠标、改变窗口尺寸、按下键盘上的一个键都会使Windows发送一个消息给应用程序。 消息本身是作为一个记录传递给应用程序的,这个记录中包含了消息的类型以及其他信息。例如,对于单击鼠标所产生的消息来说,这个记录中包含了单击鼠标时的坐标。这个记录类型叫做TMsg,它在Windows单元中是这样声明的: type TMsg = packed record hwnd: HWND; //窗口句柄 message: UINT;//消息常量标识符 wParam: WPARAM ;// 32位消息的特定附加信息 lParam: LPARAM ;// 32位消息的特定附加信息 time: DWORD;//消息创建时的时间 pt: TPoint; //消息创建时的鼠标位置 end ; 消息中有什么? 是否觉得一个消息记录中的信息像希腊语一样?如果是这样,那么看一看下面的解释:hwnd 32位的窗口句柄。窗口可以是任何类型的屏幕对象,因为Win32能够维护大多数可 视对象的句柄(窗口、对话框、按钮、编辑框等)。message 用于区别其他消息的常量值,这些常量可以是Windows单元中预定义的常量,也 可以是自定义的常量。 wParam 通常是一个与消息有关的常量值,也可能是窗口或控件的句柄。 lParam 通常是一个指向内存中数据的指针。由于WParam、lParam和Pointer都是32位的,因此,它们之间可以相互转换。 WM_NULL =$0000 // WM_CREATE =$0001 //应用程序创建一个窗口 WM_DESTROY = $0002 //一个窗口被销毁 WM_MOVE = $0003 //移动一个窗口 WM_SIZE= $0005 //改变一个窗口的大小 WM_ACTIVATE= $0006 //一个窗口被激活或失去激活状态; WM_SETFOCUS= $0007 //获得焦点后 WM_KILLFOCUS= $0008 //失去焦点 WM_ENABLE= $000A //改变enable状态 WM_SETREDRAW= $000B //设置窗口是否能重画 WM_SETTEXT= $000C //应用程序发送此消息来设置一个窗口的文本 WM_GETTEXT = $000D //应用程序发送此消息来复制对应窗口的文本到缓冲区 WM_GETTEXTLENGTH = $000E //得到与一个窗口有关的文本的长度(不包含空字符) WM_PAINT = $000F //要求一个窗口重画自己 WM_CLOSE = $0010 //当一个窗口或应用程序要关闭时发送一个信号 WM_QUERYENDSESSION= $0011 //当用户选择结束对话框或程序自己调用ExitWindows函数 WM_QUIT= $0012 //用来结束程序运行或当程序调用postquitmessage函数 WM_QUERYOPEN = $0013 //当用户窗口恢复以前的大小位置时,把此消息发送给某个图标 WM_ERASEBKGND = $0014 //当窗口背景必须被擦除时(例在窗口改变大小时) WM_SYSCOLORCHANGE = $0015 //当系统颜色改变时,发送此消息给所有顶级窗口 WM_ENDSESSION = $0016 // 当系统进程发出WM_QUERYENDSESSION消息后,此消息发送给应用程序,通知它对话是否结束 WM_SYSTEMERROR = $0017 // WM_SHOWWINDOW= $0018 //当隐藏或显示窗口是发送此消息给这个窗口 WM_ACTIVATEAPP = $001C //发此消息给应用程序哪个窗口是激活的,哪个是非激活的; WM_FONTCHANGE= $001D //当系统的字体资源库变化时发送此消息给所有顶级窗口 WM_TIMECHANGE= $001E //当系统的时间变化时发送此消息给所有顶级窗口 WM_CANCELMODE= $001F //发送此消息来取消某种正在进行的摸态(操作) WM_SETCURSOR = $0020 //如果鼠标引起光标在某个窗口中移动且鼠标输入没有被捕获时,就发消息给某个窗口 WM_MOUSEACTIVATE = $0021 //当光标在某个非激活的窗口中而用户正按着鼠标的某个键发送此消息给当前窗口 WM_CHILDACTIVATE = $0022 //发送此消息给MDI子窗口当用户点击此窗口的标题栏,或当窗口被激活,移动,改变大小 WM_QUEUESYNC= $0023 //此消息由基
使用MFC编写的基于WINCE, WM6.x操作系统的 关于输入法控制函数的示例代码。 10/29/2008 The following table shows Input Method Manager (IMM) functions with a description of the purpose of each. In This Section EnumRegisterWordProc This function is an application-defined callback function used with the ImmEnumRegisterWord function. It is used to process data of register strings. ImmAssociateContext This function associates the specified input context with the specified window. ImmAssociateContextEx This function changes the association between the input method context and the specified window or its children. ImmConfigureIME This function displays the configuration dialog box for the IME. ImmCreateContext This function creates a new input context, allocating memory for the context and initializing it. ImmCreateIMCC This function enables an IME to create a new input method context (IMC) component that is a member of an IMC. ImmDestroyContext This function releases the input context and frees any memory associated with it. ImmDestroyIMCC This function enables an IME to destroy an input method context (IMC) component that is a member of an IMC. ImmDisableIME This function disables the IME for the current thread. ImmEnumRegisterWord This function enumerates the register strings having the specified reading string, style, and register string. ImmEscape This function carries out IME–specific subfunctions and is used mainly for locale-specific functions. ImmGenerateMessage This function enables an IME to generate messages that are sent to the window associated with the input method context (IMC). ImmGetCandidateList This function retrieves a specified candidate list, copying the list to the specified buffer. ImmGetCandidateListCount This function retrieves the size, in bytes, of the candidate lists. ImmGetCandidateWindow This function gets information about the candidate list window. ImmGetCompositionFont This function retrieves information about the logical font currently used to display characters in the composition window. ImmGetCompositionString This function retrieves information about the composition string. ImmGetCompositionWindow This function gets information about the composition window. ImmGetContext This function retrieves the input context associated with the specified window. ImmGetConversionList This function retrieves the list of characters or words from one character or word. ImmGetConversionStatus This function gets the current conversion status. ImmGetConversionStatusForeground This function retrieves the current IME conversion and sentences modes for the foreground thread. ImmGetDefaultIMEWnd This function gets the default window handle to the IME class. ImmGetDescription This function copies the description of the IME to the specified buffer. ImmGetGuideLine This function gets information about errors. Applications use the information to notify users. ImmGetHotKey This function retrieves the value of the IME hot key. ImmGetIMCCLockCount This function enables an IME to get the lock count of the input method context (IMC) component. ImmGetIMCCSize This function enables an IME to get the size of the input method context (IMC) component. ImmGetIMEFileName This function gets the file name of the IME associated with the specified keyboard layout. ImmGetImeMenuItems This function retrieves the menu items that are registered in the IME menu. ImmGetOpenStatus

33,311

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 新手乐园
社区管理员
  • 新手乐园社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧