説明
IMEのラッパーです。IMEのおおまかなメッセージを処理しています。このサンプルでは非表示を行う。
HSPスクリプト
//Created by As<akicansoft@gmail.com> //WindowsAPI #uselib "user32.dll" #define global DefWindowProc DefWindowProcA #func global DefWindowProcA "DefWindowProcA" sptr,sptr,sptr,sptr #module "mod_imedraw" //IMEメッセージ #define WM_IME_SETCONTEXT $00000281 #define WM_IME_STARTCOMPOSITION $0000010D #define WM_IME_COMPOSITION $0000010F #define WM_IME_ENDCOMPOSITION $0000010E #define WM_IME_NOTIFY $00000282 #define IMN_OPENSTATUSWINDOW $00000002 #define IMN_CLOSESTATUSWINDOW $00000001 #define IMN_OPENCANDIDATE $00000005 #define IMN_CHANGECANDIDATE $00000003 #define IMN_CLOSECANDIDATE $00000004 #define ISC_SHOWUIALL $C000000F //IME入力画面の非表示 #deffunc imedraw oncmd gosub *ON_WM_IME_SETCONTEXT,WM_IME_SETCONTEXT oncmd gosub *ON_WM_IME_STARTCOMPOSITION,WM_IME_STARTCOMPOSITION oncmd gosub *ON_WM_IME_COMPOSITION,WM_IME_COMPOSITION oncmd gosub *ON_WM_IME_ENDCOMPOSITION,WM_IME_ENDCOMPOSITION oncmd gosub *ON_WM_IME_NOTIFY,WM_IME_NOTIFY return *ON_WM_IME_SETCONTEXT return *ON_WM_IME_STARTCOMPOSITION return 0 *ON_WM_IME_COMPOSITION return 0 *ON_WM_IME_ENDCOMPOSITION return 0 *ON_WM_IME_NOTIFY switch wparam case IMN_OPENSTATUSWINDOW return 0 swbreak case IMN_CLOSESTATUSWINDOW return 0 swbreak case IMN_OPENCANDIDATE return 0 swbreak case IMN_CHANGECANDIDATE return 0 swbreak case IMN_CLOSECANDIDATE return 0 swbreak default DefWindowProc hwnd,WM_IME_NOTIFY,wparam,lparam return 0 swbreak swend return #global imedraw stop