Imm.h
上传用户:szljw888
上传日期:2010-04-11
资源大小:124k
文件大小:37k
源码类别:

输入法编程

开发平台:

C/C++

  1. /**********************************************************************/
  2. /*      IMM.H - Input Method Manager definitions                      */
  3. /*                                                                    */
  4. /*      Copyright (c) 1993-1995  Microsoft Corporation                */
  5. /**********************************************************************/
  6. #ifndef _IMM_
  7. #define _IMM_        // defined if IMM.H has been included
  8. //#define MAXCANDSTRNUM           700
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. #ifndef _WINUSER_
  13. #define VK_PROCESSKEY 0x0E5
  14. #endif
  15. #ifndef WINVER
  16. #define WINVER 0x040A
  17. #endif
  18. #if(WINVER >= 0x040A)
  19. DECLARE_HANDLE(HIMC);
  20. #else
  21. typedef DWORD     HIMC;
  22. #endif
  23. #if(WINVER >= 0x040A)
  24. DECLARE_HANDLE(HIMCC);
  25. #else
  26. typedef DWORD     HIMCC;
  27. #endif
  28. typedef HKL FAR  *LPHKL;
  29. typedef UINT FAR *LPUINT;
  30. #define NULLIMC  ((HIMC)0)
  31. typedef struct tagCOMPOSITIONFORM {
  32.     DWORD dwStyle;
  33.     POINT ptCurrentPos;
  34.     RECT  rcArea;
  35. } COMPOSITIONFORM, *PCOMPOSITIONFORM, NEAR *NPCOMPOSITIONFORM, FAR *LPCOMPOSITIONFORM;
  36. typedef struct tagCANDIDATEFORM {
  37.     DWORD dwIndex;
  38.     DWORD dwStyle;
  39.     POINT ptCurrentPos;
  40.     RECT  rcArea;
  41. } CANDIDATEFORM, *PCANDIDATEFORM, NEAR *NPCANDIDATEFORM, FAR *LPCANDIDATEFORM;
  42. typedef struct tagCOMPOSITIONSTRING {                   
  43.     DWORD dwSize;                                       
  44.     DWORD dwCompReadAttrLen;                            
  45.     DWORD dwCompReadAttrOffset;                         
  46.     DWORD dwCompReadClauseLen;                          
  47.     DWORD dwCompReadClauseOffset;                       
  48.     DWORD dwCompReadStrLen;                             
  49.     DWORD dwCompReadStrOffset;                          
  50.     DWORD dwCompAttrLen;                                
  51.     DWORD dwCompAttrOffset;                             
  52.     DWORD dwCompClauseLen;                              
  53.     DWORD dwCompClauseOffset;                           
  54.     DWORD dwCompStrLen; //这个参数重要                                
  55.     DWORD dwCompStrOffset;                              
  56.     DWORD dwCursorPos;                                  
  57.     DWORD dwDeltaStart;                                 
  58.     DWORD dwResultReadClauseLen;                        
  59.     DWORD dwResultReadClauseOffset;                     
  60.     DWORD dwResultReadStrLen;                           
  61.     DWORD dwResultReadStrOffset;                        
  62.     DWORD dwResultClauseLen;                            
  63.     DWORD dwResultClauseOffset;                         
  64.     DWORD dwResultStrLen;                               
  65.     DWORD dwResultStrOffset;                            
  66.     DWORD dwPrivateSize;                                
  67.     DWORD dwPrivateOffset;                              
  68. } COMPOSITIONSTRING, *PCOMPOSITIONSTRING, NEAR *NPCOMPOSITIONSTRING, FAR  *LPCOMPOSITIONSTRING;     
  69.                                                         
  70.                                                         
  71. typedef struct tagGUIDELINE {                           
  72.     DWORD dwSize;                                       
  73.     DWORD dwLevel;                                      
  74.     DWORD dwIndex;                                      
  75.     DWORD dwStrLen;                                     
  76.     DWORD dwStrOffset;                                  
  77.     DWORD dwPrivateSize;                                
  78.     DWORD dwPrivateOffset;                              
  79. } GUIDELINE, *PGUIDELINE, NEAR *NPGUIDELINE, FAR *LPGUIDELINE;  
  80.                                                         
  81.                                                         
  82. typedef struct tagCANDIDATELIST {
  83.     DWORD dwSize;
  84.     DWORD dwStyle;
  85.     DWORD dwCount;
  86.     DWORD dwSelection;
  87.     DWORD dwPageStart;
  88.     DWORD dwPageSize;
  89.     DWORD dwOffset[1];
  90. } CANDIDATELIST, *PCANDIDATELIST, NEAR *NPCANDIDATELIST, FAR *LPCANDIDATELIST;
  91. typedef struct tagREGISTERWORDA {
  92.     LPSTR   lpReading;
  93.     LPSTR   lpWord;
  94. } REGISTERWORDA, *PREGISTERWORDA, NEAR *NPREGISTERWORDA, FAR *LPREGISTERWORDA;
  95. typedef struct tagREGISTERWORDW {
  96.     LPWSTR  lpReading;
  97.     LPWSTR  lpWord;
  98. } REGISTERWORDW, *PREGISTERWORDW, NEAR *NPREGISTERWORDW, FAR *LPREGISTERWORDW;
  99. #ifdef UNICODE
  100. typedef REGISTERWORDW REGISTERWORD;
  101. typedef PREGISTERWORDW PREGISTERWORD;
  102. typedef NPREGISTERWORDW NPREGISTERWORD;
  103. typedef LPREGISTERWORDW LPREGISTERWORD;
  104. #else
  105. typedef REGISTERWORDA REGISTERWORD;
  106. typedef PREGISTERWORDA PREGISTERWORD;
  107. typedef NPREGISTERWORDA NPREGISTERWORD;
  108. typedef LPREGISTERWORDA LPREGISTERWORD;
  109. #endif // UNICODE
  110. #if(WINVER >= 0x040A)
  111. typedef struct tagRECONVERTSTRING {
  112.     DWORD dwSize;
  113.     DWORD dwVersion;
  114.     DWORD dwStrLen;
  115.     DWORD dwStrOffset;
  116.     DWORD dwCompStrLen;
  117.     DWORD dwCompStrOffset;
  118.     DWORD dwTargetStrLen;
  119.     DWORD dwTargetStrOffset;
  120. } RECONVERTSTRING, *PRECONVERTSTRING, NEAR *NPRECONVERTSTRING, FAR *LPRECONVERTSTRING;
  121. #endif
  122. typedef struct tagCANDIDATEINFO {                       
  123.     DWORD               dwSize;                         
  124.     DWORD               dwCount;                        
  125.     DWORD               dwOffset[32]; // MAXCANDSTRNUM                 
  126.     DWORD               dwPrivateSize;                  
  127.     DWORD               dwPrivateOffset;                
  128. } CANDIDATEINFO, *PCANDIDATEINFO, NEAR *NPCANDIDATEINFO, FAR *LPCANDIDATEINFO;  
  129.                                                         
  130.                                                         
  131. typedef struct tagINPUTCONTEXT {                        
  132.     HWND                hWnd;                           
  133.     BOOL                fOpen;                          
  134.     POINT               ptStatusWndPos;                 
  135.     POINT               ptSoftKbdPos;                   
  136.     DWORD               fdwConversion;                  
  137.     DWORD               fdwSentence;                    
  138.     union   {                                           
  139.         LOGFONTA        A;                              
  140.         LOGFONTW        W;                              
  141.     } lfFont;                                           
  142.     COMPOSITIONFORM     cfCompForm;                     
  143.     CANDIDATEFORM       cfCandForm[4];                  
  144.     HIMCC               hCompStr;                       
  145.     HIMCC               hCandInfo;                      
  146.     HIMCC               hGuideLine;                     
  147.     HIMCC               hPrivate;                       
  148.     DWORD               dwNumMsgBuf;                    
  149.     HIMCC               hMsgBuf;                        
  150.     DWORD               fdwInit;                        
  151.     DWORD               dwReserve[3];                   
  152. } INPUTCONTEXT, *PINPUTCONTEXT, NEAR *NPINPUTCONTEXT, FAR *LPINPUTCONTEXT;  
  153.                                                         
  154.                                                         
  155. typedef struct tagIMEINFO {                             
  156.     DWORD       dwPrivateDataSize;                      
  157.     DWORD       fdwProperty;                            
  158.     DWORD       fdwConversionCaps;                      
  159.     DWORD       fdwSentenceCaps;                        
  160.     DWORD       fdwUICaps;                              
  161.     DWORD       fdwSCSCaps;                             
  162.     DWORD       fdwSelectCaps;                          
  163. } IMEINFO, *PIMEINFO, NEAR *NPIMEINFO, FAR *LPIMEINFO;  
  164.                                                         
  165.                                                         
  166. #define STYLE_DESCRIPTION_SIZE  32
  167. typedef struct tagSTYLEBUFA {
  168.     DWORD       dwStyle;
  169.     CHAR        szDescription[STYLE_DESCRIPTION_SIZE];
  170. } STYLEBUFA, *PSTYLEBUFA, NEAR *NPSTYLEBUFA, FAR *LPSTYLEBUFA;
  171. typedef struct tagSTYLEBUFW {
  172.     DWORD       dwStyle;
  173.     WCHAR       szDescription[STYLE_DESCRIPTION_SIZE];
  174. } STYLEBUFW, *PSTYLEBUFW, NEAR *NPSTYLEBUFW, FAR *LPSTYLEBUFW;
  175. #ifdef UNICODE
  176. typedef STYLEBUFW STYLEBUF;
  177. typedef PSTYLEBUFW PSTYLEBUF;
  178. typedef NPSTYLEBUFW NPSTYLEBUF;
  179. typedef LPSTYLEBUFW LPSTYLEBUF;
  180. #else
  181. typedef STYLEBUFA STYLEBUF;
  182. typedef PSTYLEBUFA PSTYLEBUF;
  183. typedef NPSTYLEBUFA NPSTYLEBUF;
  184. typedef LPSTYLEBUFA LPSTYLEBUF;
  185. #endif // UNICODE
  186. #if(WINVER >= 0x040A)
  187. #define IMEMENUITEM_STRING_SIZE 80 
  188. typedef struct tagIMEMENUITEMINFOA {
  189.     UINT        cbSize;
  190.     UINT        fType;
  191.     UINT        fState;
  192.     UINT        wID;
  193.     HBITMAP     hbmpChecked;
  194.     HBITMAP     hbmpUnchecked;
  195.     DWORD       dwItemData;
  196.     CHAR        szString[IMEMENUITEM_STRING_SIZE];
  197.     HBITMAP     hbmpItem;
  198. } IMEMENUITEMINFOA, *PIMEMENUITEMINFOA, NEAR *NPIMEMENUITEMINFOA, FAR *LPIMEMENUITEMINFOA;
  199. typedef struct tagIMEMENUITEMINFOW {
  200.     UINT        cbSize;
  201.     UINT        fType;
  202.     UINT        fState;
  203.     UINT        wID;
  204.     HBITMAP     hbmpChecked;
  205.     HBITMAP     hbmpUnchecked;
  206.     DWORD       dwItemData;
  207.     WCHAR       szString[IMEMENUITEM_STRING_SIZE];
  208.     HBITMAP     hbmpItem;
  209. } IMEMENUITEMINFOW, *PIMEMENUITEMINFOW, NEAR *NPIMEMENUITEMINFOW, FAR *LPIMEMENUITEMINFOW;
  210. #ifdef UNICODE
  211. typedef IMEMENUITEMINFOW IMEMENUITEMINFO;
  212. typedef PIMEMENUITEMINFOW PIMEMENUITEMINFO;
  213. typedef NPIMEMENUITEMINFOW NPIMEMENUITEMINFO;
  214. typedef LPIMEMENUITEMINFOW LPIMEMENUITEMINFO;
  215. #else
  216. typedef IMEMENUITEMINFOA IMEMENUITEMINFO;
  217. typedef PIMEMENUITEMINFOA PIMEMENUITEMINFO;
  218. typedef NPIMEMENUITEMINFOA NPIMEMENUITEMINFO;
  219. typedef LPIMEMENUITEMINFOA LPIMEMENUITEMINFO;
  220. #endif // UNICODE
  221. typedef struct tagIMECHARPOSITION {
  222.     DWORD       dwSize;
  223.     DWORD       dwCharPos;
  224.     POINT       pt;
  225.     UINT        cLineHeight;
  226.     RECT        rcDocument;
  227. } IMECHARPOSITION, *PIMECHARPOSITION, NEAR *NPIMECHARPOSITION, FAR *LPIMECHARPOSITION;
  228. #endif /* WINVER >= 0x040A */
  229. typedef struct tagSOFTKBDDATA {                         
  230.     UINT        uCount;                                 
  231.     WORD        wCode[1][256];                          
  232. } SOFTKBDDATA, *PSOFTKBDDATA, NEAR *NPSOFTKBDDATA, FAR * LPSOFTKBDDATA; 
  233.                                                         
  234.                                                         
  235. // prototype of IMM API
  236. HKL  WINAPI ImmInstallIMEA(LPCSTR lpszIMEFileName, LPCSTR lpszLayoutText);
  237. HKL  WINAPI ImmInstallIMEW(LPCWSTR lpszIMEFileName, LPCWSTR lpszLayoutText);
  238. #ifdef UNICODE
  239. #define ImmInstallIME  ImmInstallIMEW
  240. #else
  241. #define ImmInstallIME  ImmInstallIMEA
  242. #endif // !UNICODE
  243. HWND WINAPI ImmGetDefaultIMEWnd(HWND);
  244. UINT WINAPI ImmGetDescriptionA(HKL, LPSTR, UINT uBufLen);
  245. UINT WINAPI ImmGetDescriptionW(HKL, LPWSTR, UINT uBufLen);
  246. #ifdef UNICODE
  247. #define ImmGetDescription  ImmGetDescriptionW
  248. #else
  249. #define ImmGetDescription  ImmGetDescriptionA
  250. #endif // !UNICODE
  251. UINT WINAPI ImmGetIMEFileNameA(HKL, LPSTR, UINT uBufLen);
  252. UINT WINAPI ImmGetIMEFileNameW(HKL, LPWSTR, UINT uBufLen);
  253. #ifdef UNICODE
  254. #define ImmGetIMEFileName  ImmGetIMEFileNameW
  255. #else
  256. #define ImmGetIMEFileName  ImmGetIMEFileNameA
  257. #endif // !UNICODE
  258. DWORD WINAPI ImmGetProperty(HKL, DWORD);
  259. BOOL WINAPI ImmIsIME(HKL);
  260. BOOL WINAPI ImmGetHotKey(DWORD, LPUINT, LPUINT, LPHKL); 
  261. BOOL WINAPI ImmSetHotKey(DWORD, UINT, UINT, HKL);       
  262. BOOL WINAPI ImmSimulateHotKey(HWND, DWORD);
  263. HIMC WINAPI ImmCreateContext(void);
  264. BOOL WINAPI ImmDestroyContext(HIMC);
  265. HIMC WINAPI ImmGetContext(HWND);
  266. BOOL WINAPI ImmReleaseContext(HWND, HIMC);
  267. HIMC WINAPI ImmAssociateContext(HWND, HIMC);
  268. #if(WINVER >= 0x040A)
  269. BOOL WINAPI ImmAssociateContextEx(HWND, HIMC, DWORD);
  270. #endif /* WINVER >= 0x040A */
  271. LONG  WINAPI ImmGetCompositionStringA(HIMC, DWORD, LPVOID, DWORD);
  272. LONG  WINAPI ImmGetCompositionStringW(HIMC, DWORD, LPVOID, DWORD);
  273. #ifdef UNICODE
  274. #define ImmGetCompositionString  ImmGetCompositionStringW
  275. #else
  276. #define ImmGetCompositionString  ImmGetCompositionStringA
  277. #endif // !UNICODE
  278. BOOL  WINAPI ImmSetCompositionStringA(HIMC, DWORD, LPCVOID, DWORD, LPCVOID, DWORD);
  279. BOOL  WINAPI ImmSetCompositionStringW(HIMC, DWORD, LPCVOID, DWORD, LPCVOID, DWORD);
  280. #ifdef UNICODE
  281. #define ImmSetCompositionString  ImmSetCompositionStringW
  282. #else
  283. #define ImmSetCompositionString  ImmSetCompositionStringA
  284. #endif // !UNICODE
  285. DWORD WINAPI ImmGetCandidateListCountA(HIMC, LPDWORD);
  286. DWORD WINAPI ImmGetCandidateListCountW(HIMC, LPDWORD);
  287. #ifdef UNICODE
  288. #define ImmGetCandidateListCount  ImmGetCandidateListCountW
  289. #else
  290. #define ImmGetCandidateListCount  ImmGetCandidateListCountA
  291. #endif // !UNICODE
  292. DWORD WINAPI ImmGetCandidateListA(HIMC, DWORD, LPCANDIDATELIST, DWORD);
  293. DWORD WINAPI ImmGetCandidateListW(HIMC, DWORD, LPCANDIDATELIST, DWORD);
  294. #ifdef UNICODE
  295. #define ImmGetCandidateList  ImmGetCandidateListW
  296. #else
  297. #define ImmGetCandidateList  ImmGetCandidateListA
  298. #endif // !UNICODE
  299. DWORD WINAPI ImmGetGuideLineA(HIMC, DWORD, LPSTR, DWORD);
  300. DWORD WINAPI ImmGetGuideLineW(HIMC, DWORD, LPWSTR, DWORD);
  301. #ifdef UNICODE
  302. #define ImmGetGuideLine  ImmGetGuideLineW
  303. #else
  304. #define ImmGetGuideLine  ImmGetGuideLineA
  305. #endif // !UNICODE
  306. BOOL WINAPI ImmGetConversionStatus(HIMC, LPDWORD, LPDWORD);
  307. BOOL WINAPI ImmSetConversionStatus(HIMC, DWORD, DWORD);
  308. BOOL WINAPI ImmGetOpenStatus(HIMC);
  309. BOOL WINAPI ImmSetOpenStatus(HIMC, BOOL);
  310. BOOL WINAPI ImmGetCompositionFontA(HIMC, LPLOGFONTA);
  311. BOOL WINAPI ImmGetCompositionFontW(HIMC, LPLOGFONTW);
  312. #ifdef UNICODE
  313. #define ImmGetCompositionFont  ImmGetCompositionFontW
  314. #else
  315. #define ImmGetCompositionFont  ImmGetCompositionFontA
  316. #endif // !UNICODE
  317. BOOL WINAPI ImmSetCompositionFontA(HIMC, LPLOGFONTA);
  318. BOOL WINAPI ImmSetCompositionFontW(HIMC, LPLOGFONTW);
  319. #ifdef UNICODE
  320. #define ImmSetCompositionFont  ImmSetCompositionFontW
  321. #else
  322. #define ImmSetCompositionFont  ImmSetCompositionFontA
  323. #endif // !UNICODE
  324. BOOL    WINAPI ImmConfigureIMEA(HKL, HWND, DWORD, LPVOID);
  325. BOOL    WINAPI ImmConfigureIMEW(HKL, HWND, DWORD, LPVOID);
  326. #ifdef UNICODE
  327. #define ImmConfigureIME  ImmConfigureIMEW
  328. #else
  329. #define ImmConfigureIME  ImmConfigureIMEA
  330. #endif // !UNICODE
  331. LRESULT WINAPI ImmEscapeA(HKL, HIMC, UINT, LPVOID);
  332. LRESULT WINAPI ImmEscapeW(HKL, HIMC, UINT, LPVOID);
  333. #ifdef UNICODE
  334. #define ImmEscape  ImmEscapeW
  335. #else
  336. #define ImmEscape  ImmEscapeA
  337. #endif // !UNICODE
  338. DWORD   WINAPI ImmGetConversionListA(HKL, HIMC, LPCSTR, LPCANDIDATELIST, DWORD, UINT);
  339. DWORD   WINAPI ImmGetConversionListW(HKL, HIMC, LPCWSTR, LPCANDIDATELIST, DWORD, UINT);
  340. #ifdef UNICODE
  341. #define ImmGetConversionList  ImmGetConversionListW
  342. #else
  343. #define ImmGetConversionList  ImmGetConversionListA
  344. #endif // !UNICODE
  345. BOOL    WINAPI ImmNotifyIME(HIMC, DWORD, DWORD, DWORD);
  346. BOOL WINAPI ImmGetStatusWindowPos(HIMC, LPPOINT);
  347. BOOL WINAPI ImmSetStatusWindowPos(HIMC, LPPOINT);
  348. BOOL WINAPI ImmGetCompositionWindow(HIMC, LPCOMPOSITIONFORM);
  349. BOOL WINAPI ImmSetCompositionWindow(HIMC, LPCOMPOSITIONFORM);
  350. BOOL WINAPI ImmGetCandidateWindow(HIMC, DWORD, LPCANDIDATEFORM);
  351. BOOL WINAPI ImmSetCandidateWindow(HIMC, LPCANDIDATEFORM);
  352. BOOL WINAPI ImmIsUIMessageA(HWND, UINT, WPARAM, LPARAM);
  353. BOOL WINAPI ImmIsUIMessageW(HWND, UINT, WPARAM, LPARAM);
  354. #ifdef UNICODE
  355. #define ImmIsUIMessage  ImmIsUIMessageW
  356. #else
  357. #define ImmIsUIMessage  ImmIsUIMessageA
  358. #endif // !UNICODE
  359. BOOL WINAPI ImmGenerateMessage(HIMC);                   
  360. UINT WINAPI ImmGetVirtualKey(HWND);
  361. typedef int (CALLBACK *REGISTERWORDENUMPROCA)(LPCSTR, DWORD, LPCSTR, LPVOID);
  362. typedef int (CALLBACK *REGISTERWORDENUMPROCW)(LPCWSTR, DWORD, LPCWSTR, LPVOID);
  363. #ifdef UNICODE
  364. #define REGISTERWORDENUMPROC  REGISTERWORDENUMPROCW
  365. #else
  366. #define REGISTERWORDENUMPROC  REGISTERWORDENUMPROCA
  367. #endif // !UNICODE
  368. BOOL WINAPI ImmRegisterWordA(HKL, LPCSTR, DWORD, LPCSTR);
  369. BOOL WINAPI ImmRegisterWordW(HKL, LPCWSTR, DWORD, LPCWSTR);
  370. #ifdef UNICODE
  371. #define ImmRegisterWord  ImmRegisterWordW
  372. #else
  373. #define ImmRegisterWord  ImmRegisterWordA
  374. #endif // !UNICODE
  375. BOOL WINAPI ImmUnregisterWordA(HKL, LPCSTR, DWORD, LPCSTR);
  376. BOOL WINAPI ImmUnregisterWordW(HKL, LPCWSTR, DWORD, LPCWSTR);
  377. #ifdef UNICODE
  378. #define ImmUnregisterWord  ImmUnregisterWordW
  379. #else
  380. #define ImmUnregisterWord  ImmUnregisterWordA
  381. #endif // !UNICODE
  382. UINT WINAPI ImmGetRegisterWordStyleA(HKL, UINT, LPSTYLEBUFA);
  383. UINT WINAPI ImmGetRegisterWordStyleW(HKL, UINT, LPSTYLEBUFW);
  384. #ifdef UNICODE
  385. #define ImmGetRegisterWordStyle  ImmGetRegisterWordStyleW
  386. #else
  387. #define ImmGetRegisterWordStyle  ImmGetRegisterWordStyleA
  388. #endif // !UNICODE
  389. UINT WINAPI ImmEnumRegisterWordA(HKL, REGISTERWORDENUMPROCA, LPCSTR, DWORD, LPCSTR, LPVOID);
  390. UINT WINAPI ImmEnumRegisterWordW(HKL, REGISTERWORDENUMPROCW, LPCWSTR, DWORD, LPCWSTR, LPVOID);
  391. #ifdef UNICODE
  392. #define ImmEnumRegisterWord  ImmEnumRegisterWordW
  393. #else
  394. #define ImmEnumRegisterWord  ImmEnumRegisterWordA
  395. #endif // !UNICODE
  396. #if(WINVER >= 0x040A)
  397. BOOL WINAPI ImmDisableIME(DWORD);
  398. DWORD WINAPI ImmGetImeMenuItemsA(HIMC, DWORD, DWORD, LPIMEMENUITEMINFOA, LPIMEMENUITEMINFOA, DWORD);
  399. DWORD WINAPI ImmGetImeMenuItemsW(HIMC, DWORD, DWORD, LPIMEMENUITEMINFOW, LPIMEMENUITEMINFOW, DWORD);
  400. #ifdef UNICODE
  401. #define ImmGetImeMenuItems  ImmGetImeMenuItemsW
  402. #else
  403. #define ImmGetImeMenuItems  ImmGetImeMenuItemsA
  404. #endif // !UNICODE
  405. LRESULT WINAPI ImmRequestMessageA(HIMC, WPARAM, LPARAM);        
  406. LRESULT WINAPI ImmRequestMessageW(HIMC, WPARAM, LPARAM);        
  407. #ifdef UNICODE
  408. #define ImmRequestMessage  ImmRequestMessageW
  409. #else
  410. #define ImmRequestMessage  ImmRequestMessageA
  411. #endif // !UNICODE
  412. #endif /* WINVER >= 0x040A */
  413. //                                                              
  414. // Prototype of soft keyboard APIs                              
  415. //                                                              
  416.                                                                 
  417. HWND WINAPI ImmCreateSoftKeyboard(UINT, HWND, int, int);        
  418. BOOL WINAPI ImmDestroySoftKeyboard(HWND);                       
  419. BOOL WINAPI ImmShowSoftKeyboard(HWND, int);                     
  420.                                                                 
  421.                                                                 
  422. LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC);                         
  423. BOOL  WINAPI ImmUnlockIMC(HIMC);                                
  424. DWORD WINAPI ImmGetIMCLockCount(HIMC);                          
  425.                                                                 
  426.                                                                 
  427. HIMCC  WINAPI ImmCreateIMCC(DWORD);                             
  428. HIMCC  WINAPI ImmDestroyIMCC(HIMCC);                            
  429. LPVOID WINAPI ImmLockIMCC(HIMCC);                               
  430. BOOL   WINAPI ImmUnlockIMCC(HIMCC);                             
  431. DWORD  WINAPI ImmGetIMCCLockCount(HIMCC);                       
  432. HIMCC  WINAPI ImmReSizeIMCC(HIMCC, DWORD);                      
  433. DWORD  WINAPI ImmGetIMCCSize(HIMCC);                            
  434.                                                                 
  435.                                                                 
  436. // the window extra offset                                      
  437. #define IMMGWL_IMC                      0                       
  438. #define IMMGWL_PRIVATE                  (sizeof(LONG))          
  439.                                                                 
  440.                                                                 
  441. // the IME related messages
  442. #define WM_CONVERTREQUESTEX             0x0108
  443. #define WM_IME_STARTCOMPOSITION         0x010D
  444. #define WM_IME_ENDCOMPOSITION           0x010E
  445. #define WM_IME_COMPOSITION              0x010F
  446. #define WM_IME_KEYLAST                  0x010F
  447. #define WM_IME_SETCONTEXT               0x0281
  448. #define WM_IME_NOTIFY                   0x0282
  449. #define WM_IME_CONTROL                  0x0283
  450. #define WM_IME_COMPOSITIONFULL          0x0284
  451. #define WM_IME_SELECT                   0x0285
  452. #define WM_IME_CHAR                     0x0286
  453. #define WM_IME_REQUEST                  0x0288
  454. #define WM_IME_KEYDOWN                  0x0290
  455. #define WM_IME_KEYUP                    0x0291
  456. // wParam for WM_IME_CONTROL                 
  457. #define IMC_GETCANDIDATEPOS             0x0007
  458. #define IMC_SETCANDIDATEPOS             0x0008
  459. #define IMC_GETCOMPOSITIONFONT          0x0009
  460. #define IMC_SETCOMPOSITIONFONT          0x000A
  461. #define IMC_GETCOMPOSITIONWINDOW        0x000B
  462. #define IMC_SETCOMPOSITIONWINDOW        0x000C
  463. #define IMC_GETSTATUSWINDOWPOS          0x000F
  464. #define IMC_SETSTATUSWINDOWPOS          0x0010
  465. #define IMC_CLOSESTATUSWINDOW           0x0021
  466. #define IMC_OPENSTATUSWINDOW            0x0022
  467. // for NI_CONTEXTUPDATED                                
  468. #define IMC_SETCONVERSIONMODE           0x0002          
  469. #define IMC_SETSENTENCEMODE             0x0004          
  470. #define IMC_SETOPENSTATUS               0x0006          
  471. // wParam for WM_IME_CONTROL to the soft keyboard
  472. #define IMC_GETSOFTKBDFONT              0x0011          
  473. #define IMC_SETSOFTKBDFONT              0x0012          
  474. #define IMC_GETSOFTKBDPOS               0x0013          
  475. #define IMC_SETSOFTKBDPOS               0x0014          
  476. #define IMC_GETSOFTKBDSUBTYPE           0x0015          
  477. #define IMC_SETSOFTKBDSUBTYPE           0x0016          
  478. #define IMC_SETSOFTKBDDATA              0x0018          
  479.                                                         
  480.                                                         
  481. // dwAction for ImmNotifyIME
  482. #define NI_CONTEXTUPDATED               0x0003          
  483. #define NI_OPENCANDIDATE                0x0010
  484. #define NI_CLOSECANDIDATE               0x0011
  485. #define NI_SELECTCANDIDATESTR           0x0012
  486. #define NI_CHANGECANDIDATELIST          0x0013
  487. #define NI_FINALIZECONVERSIONRESULT     0x0014
  488. #define NI_COMPOSITIONSTR               0x0015
  489. #define NI_SETCANDIDATE_PAGESTART       0x0016
  490. #define NI_SETCANDIDATE_PAGESIZE        0x0017
  491. #define NI_IMEMENUSELECTED              0x0018
  492. // lParam for WM_IME_SETCONTEXT
  493. #define ISC_SHOWUICANDIDATEWINDOW       0x00000001
  494. #define ISC_SHOWUICOMPOSITIONWINDOW     0x80000000
  495. #define ISC_SHOWUIGUIDELINE             0x40000000
  496. #define ISC_SHOWUIALLCANDIDATEWINDOW    0x0000000F
  497. #define ISC_SHOWUIALL                   0xC000000F
  498. // dwIndex for ImmNotifyIME/NI_COMPOSITIONSTR
  499. #define CPS_COMPLETE                    0x0001
  500. #define CPS_CONVERT                     0x0002
  501. #define CPS_REVERT                      0x0003
  502. #define CPS_CANCEL                      0x0004
  503. // the modifiers of hot key
  504. #define MOD_ALT                         0x0001
  505. #define MOD_CONTROL                     0x0002
  506. #define MOD_SHIFT                       0x0004
  507. #define MOD_LEFT                        0x8000
  508. #define MOD_RIGHT                       0x4000
  509. #define MOD_ON_KEYUP                    0x0800
  510. #define MOD_IGNORE_ALL_MODIFIER         0x0400
  511. // Windows for Simplified Chinese Edition hot key ID from 0x10 - 0x2F
  512. #define IME_CHOTKEY_IME_NONIME_TOGGLE           0x10
  513. #define IME_CHOTKEY_SHAPE_TOGGLE                0x11
  514. #define IME_CHOTKEY_SYMBOL_TOGGLE               0x12
  515. // Windows for Japanese Edition hot key ID from 0x30 - 0x4F
  516. #define IME_JHOTKEY_CLOSE_OPEN                  0x30
  517. // Windows for Korean Edition hot key ID from 0x50 - 0x6F
  518. #define IME_KHOTKEY_SHAPE_TOGGLE                0x50
  519. #define IME_KHOTKEY_HANJACONVERT                0x51
  520. #define IME_KHOTKEY_ENGLISH                     0x52
  521. // Windows for Tranditional Chinese Edition hot key ID from 0x70 - 0x8F
  522. #define IME_THOTKEY_IME_NONIME_TOGGLE           0x70
  523. #define IME_THOTKEY_SHAPE_TOGGLE                0x71
  524. #define IME_THOTKEY_SYMBOL_TOGGLE               0x72
  525. // direct switch hot key ID from 0x100 - 0x11F
  526. #define IME_HOTKEY_DSWITCH_FIRST                0x100
  527. #define IME_HOTKEY_DSWITCH_LAST                 0x11F
  528. // IME private hot key from 0x200 - 0x21F
  529. #define IME_HOTKEY_PRIVATE_FIRST                0x200
  530. #define IME_ITHOTKEY_RESEND_RESULTSTR           0x200
  531. #define IME_ITHOTKEY_PREVIOUS_COMPOSITION       0x201
  532. #define IME_ITHOTKEY_UISTYLE_TOGGLE             0x202
  533. #define IME_ITHOTKEY_RECONVERTSTRING            0x203
  534. #define IME_HOTKEY_PRIVATE_LAST                 0x21F
  535. // dwSystemInfoFlags bits
  536. #define IME_SYSINFO_WINLOGON            0x0001      
  537. #define IME_SYSINFO_WOW16               0x0002      
  538. // parameter of ImmGetCompositionString
  539. #define GCS_COMPREADSTR                 0x0001
  540. #define GCS_COMPREADATTR                0x0002
  541. #define GCS_COMPREADCLAUSE              0x0004
  542. #define GCS_COMPSTR                     0x0008
  543. #define GCS_COMPATTR                    0x0010
  544. #define GCS_COMPCLAUSE                  0x0020
  545. #define GCS_CURSORPOS                   0x0080
  546. #define GCS_DELTASTART                  0x0100
  547. #define GCS_RESULTREADSTR               0x0200
  548. #define GCS_RESULTREADCLAUSE            0x0400
  549. #define GCS_RESULTSTR                   0x0800
  550. #define GCS_RESULTCLAUSE                0x1000
  551. // style bit flags for WM_IME_COMPOSITION
  552. #define CS_INSERTCHAR                   0x2000
  553. #define CS_NOMOVECARET                  0x4000
  554. #define GCS_COMP                        (GCS_COMPSTR|GCS_COMPATTR|GCS_COMPCLAUSE)               
  555. #define GCS_COMPREAD                    (GCS_COMPREADSTR|GCS_COMPREADATTR |GCS_COMPREADCLAUSE)  
  556. #define GCS_RESULT                      (GCS_RESULTSTR|GCS_RESULTCLAUSE)                        
  557. #define GCS_RESULTREAD                  (GCS_RESULTREADSTR|GCS_RESULTREADCLAUSE)                
  558. // bits of fdwInit of INPUTCONTEXT
  559. #define INIT_STATUSWNDPOS               0x00000001      
  560. #define INIT_CONVERSION                 0x00000002      
  561. #define INIT_SENTENCE                   0x00000004      
  562. #define INIT_LOGFONT                    0x00000008      
  563. #define INIT_COMPFORM                   0x00000010      
  564. #define INIT_SOFTKBDPOS                 0x00000020      
  565.                                                         
  566.                                                         
  567. // IME version constants
  568. #define IMEVER_0310                     0x0003000A
  569. #define IMEVER_0400                     0x00040000
  570. // IME property bits
  571. #define IME_PROP_END_UNLOAD             0x0001          
  572. #define IME_PROP_KBD_CHAR_FIRST         0x0002          
  573. #define IME_PROP_IGNORE_UPKEYS          0x0004          
  574. #define IME_PROP_NEED_ALTKEY            0x0008          
  575. #define IME_PROP_NO_KEYS_ON_CLOSE 0x0010
  576. #define IME_PROP_AT_CARET               0x00010000
  577. #define IME_PROP_SPECIAL_UI             0x00020000
  578. #define IME_PROP_CANDLIST_START_FROM_1  0x00040000
  579. #define IME_PROP_UNICODE                0x00080000
  580. #define IME_PROP_COMPLETE_ON_UNSELECT   0x00100000
  581. // IME UICapability bits
  582. #define UI_CAP_2700                     0x00000001
  583. #define UI_CAP_ROT90                    0x00000002
  584. #define UI_CAP_ROTANY                   0x00000004
  585. #define UI_CAP_SOFTKBD                  0x00010000      
  586. // ImmSetCompositionString Capability bits
  587. #define SCS_CAP_COMPSTR                 0x00000001
  588. #define SCS_CAP_MAKEREAD                0x00000002
  589. #define SCS_CAP_SETRECONVERTSTRING      0x00000004
  590. // IME WM_IME_SELECT inheritance Capability bits
  591. #define SELECT_CAP_CONVERSION           0x00000001
  592. #define SELECT_CAP_SENTENCE             0x00000002
  593. // ID for deIndex of ImmGetGuideLine
  594. #define GGL_LEVEL                       0x00000001
  595. #define GGL_INDEX                       0x00000002
  596. #define GGL_STRING                      0x00000003
  597. #define GGL_PRIVATE                     0x00000004
  598. // ID for dwLevel of GUIDELINE Structure
  599. #define GL_LEVEL_NOGUIDELINE            0x00000000
  600. #define GL_LEVEL_FATAL                  0x00000001
  601. #define GL_LEVEL_ERROR                  0x00000002
  602. #define GL_LEVEL_WARNING                0x00000003
  603. #define GL_LEVEL_INFORMATION            0x00000004
  604. // ID for dwIndex of GUIDELINE Structure
  605. #define GL_ID_UNKNOWN                   0x00000000
  606. #define GL_ID_NOMODULE                  0x00000001
  607. #define GL_ID_NODICTIONARY              0x00000010
  608. #define GL_ID_CANNOTSAVE                0x00000011
  609. #define GL_ID_NOCONVERT                 0x00000020
  610. #define GL_ID_TYPINGERROR               0x00000021
  611. #define GL_ID_TOOMANYSTROKE             0x00000022
  612. #define GL_ID_READINGCONFLICT           0x00000023
  613. #define GL_ID_INPUTREADING              0x00000024
  614. #define GL_ID_INPUTRADICAL              0x00000025
  615. #define GL_ID_INPUTCODE                 0x00000026
  616. #define GL_ID_INPUTSYMBOL               0x00000027
  617. #define GL_ID_CHOOSECANDIDATE           0x00000028
  618. #define GL_ID_REVERSECONVERSION         0x00000029
  619. #define GL_ID_PRIVATE_FIRST             0x00008000
  620. #define GL_ID_PRIVATE_LAST              0x0000FFFF
  621. // ID for dwIndex of ImmGetProperty
  622. #define IGP_GETIMEVERSION               (DWORD)(-4)
  623. #define IGP_PROPERTY                    0x00000004
  624. #define IGP_CONVERSION                  0x00000008
  625. #define IGP_SENTENCE                    0x0000000c
  626. #define IGP_UI                          0x00000010
  627. #define IGP_SETCOMPSTR                  0x00000014
  628. #define IGP_SELECT                      0x00000018
  629. // dwIndex for ImmSetCompositionString API
  630. #define SCS_SETSTR                      (GCS_COMPREADSTR|GCS_COMPSTR)
  631. #define SCS_CHANGEATTR                  (GCS_COMPREADATTR|GCS_COMPATTR)
  632. #define SCS_CHANGECLAUSE                (GCS_COMPREADCLAUSE|GCS_COMPCLAUSE)
  633. #define SCS_SETRECONVERTSTRING          0x00010000
  634. #define SCS_QUERYRECONVERTSTRING        0x00020000
  635. // attribute for COMPOSITIONSTRING Structure
  636. #define ATTR_INPUT                      0x00
  637. #define ATTR_TARGET_CONVERTED           0x01
  638. #define ATTR_CONVERTED                  0x02
  639. #define ATTR_TARGET_NOTCONVERTED        0x03
  640. #define ATTR_INPUT_ERROR                0x04
  641. #define ATTR_FIXEDCONVERTED             0x05
  642. // bit field for IMC_SETCOMPOSITIONWINDOW, IMC_SETCANDIDATEWINDOW
  643. #define CFS_DEFAULT                     0x0000
  644. #define CFS_RECT                        0x0001
  645. #define CFS_POINT                       0x0002
  646. #define CFS_FORCE_POSITION              0x0020
  647. #define CFS_CANDIDATEPOS                0x0040
  648. #define CFS_EXCLUDE                     0x0080
  649. // conversion direction for ImmGetConversionList
  650. #define GCL_CONVERSION                  0x0001
  651. #define GCL_REVERSECONVERSION           0x0002
  652. #define GCL_REVERSE_LENGTH              0x0003
  653. // bit field for conversion mode
  654. #define IME_CMODE_ALPHANUMERIC          0x0000
  655. #define IME_CMODE_NATIVE                0x0001
  656. #define IME_CMODE_CHINESE               IME_CMODE_NATIVE
  657. #define IME_CMODE_HANGEUL               IME_CMODE_NATIVE
  658. #define IME_CMODE_JAPANESE              IME_CMODE_NATIVE
  659. #define IME_CMODE_KATAKANA              0x0002  // only effect under IME_CMODE_NATIVE
  660. #define IME_CMODE_LANGUAGE              0x0003
  661. #define IME_CMODE_FULLSHAPE             0x0008
  662. #define IME_CMODE_ROMAN                 0x0010
  663. #define IME_CMODE_CHARCODE              0x0020
  664. #define IME_CMODE_HANJACONVERT          0x0040
  665. #define IME_CMODE_SOFTKBD               0x0080
  666. #define IME_CMODE_NOCONVERSION          0x0100
  667. #define IME_CMODE_EUDC                  0x0200
  668. #define IME_CMODE_SYMBOL                0x0400
  669. #define IME_CMODE_FIXED                 0x0800
  670. #define IME_SMODE_NONE                  0x0000
  671. #define IME_SMODE_PLAURALCLAUSE         0x0001
  672. #define IME_SMODE_SINGLECONVERT         0x0002
  673. #define IME_SMODE_AUTOMATIC             0x0004
  674. #define IME_SMODE_PHRASEPREDICT         0x0008
  675. #define IME_SMODE_CONVERSATION          0x0010
  676. // style of candidate
  677. #define IME_CAND_UNKNOWN                0x0000
  678. #define IME_CAND_READ                   0x0001
  679. #define IME_CAND_CODE                   0x0002
  680. #define IME_CAND_MEANING                0x0003
  681. #define IME_CAND_RADICAL                0x0004
  682. #define IME_CAND_STROKE                 0x0005
  683. // wParam of report message WM_IME_NOTIFY
  684. #define IMN_CLOSESTATUSWINDOW            0x0001
  685. #define IMN_OPENSTATUSWINDOW             0x0002
  686. #define IMN_CHANGECANDIDATE              0x0003
  687. #define IMN_CLOSECANDIDATE               0x0004
  688. #define IMN_OPENCANDIDATE                0x0005
  689. #define IMN_SETCONVERSIONMODE            0x0006
  690. #define IMN_SETSENTENCEMODE              0x0007
  691. #define IMN_SETOPENSTATUS                0x0008
  692. #define IMN_SETCANDIDATEPOS              0x0009
  693. #define IMN_SETCOMPOSITIONFONT           0x000A
  694. #define IMN_SETCOMPOSITIONWINDOW         0x000B
  695. #define IMN_SETSTATUSWINDOWPOS           0x000C
  696. #define IMN_GUIDELINE                    0x000D
  697. #define IMN_PRIVATE                      0x000E
  698. #if(WINVER >= 0x040A)
  699. // wParam of report message WM_IME_REQUEST
  700. #define IMR_COMPOSITIONWINDOW      0x0001
  701. #define IMR_CANDIDATEWINDOW        0x0002
  702. #define IMR_COMPOSITIONFONT        0x0003
  703. #define IMR_RECONVERTSTRING        0x0004
  704. #define IMR_CONFIRMRECONVERTSTRING 0x0005
  705. #define IMR_QUERYCHARPOSITION      0x0006
  706. #define IMR_DOCUMENTFEED           0x0007
  707. #endif
  708. #define IMN_SOFTKBDDESTROYED            0x0011          
  709.                                                         
  710.                                                         
  711. // error code of ImmGetCompositionString
  712. #define IMM_ERROR_NODATA                (-1)
  713. #define IMM_ERROR_GENERAL               (-2)
  714. // dialog mode of ImmConfigureIME
  715. #define IME_CONFIG_GENERAL              1
  716. #define IME_CONFIG_REGISTERWORD         2
  717. #define IME_CONFIG_SELECTDICTIONARY     3
  718. // dialog mode of ImmEscape
  719. #define IME_ESC_QUERY_SUPPORT           0x0003
  720. #define IME_ESC_RESERVED_FIRST          0x0004
  721. #define IME_ESC_RESERVED_LAST           0x07FF
  722. #define IME_ESC_PRIVATE_FIRST           0x0800
  723. #define IME_ESC_PRIVATE_LAST            0x0FFF
  724. #define IME_ESC_SEQUENCE_TO_INTERNAL    0x1001
  725. #define IME_ESC_GET_EUDC_DICTIONARY     0x1003
  726. #define IME_ESC_SET_EUDC_DICTIONARY     0x1004
  727. #define IME_ESC_MAX_KEY                 0x1005
  728. #define IME_ESC_IME_NAME                0x1006
  729. #define IME_ESC_SYNC_HOTKEY             0x1007
  730. #define IME_ESC_HANJA_MODE              0x1008
  731. #define IME_ESC_AUTOMATA                0x1009
  732. #define IME_ESC_PRIVATE_HOTKEY          0x100a
  733. #define IME_ESC_GETHELPFILENAME         0x100b
  734. // style of word registration
  735. #define IME_REGWORD_STYLE_EUDC          0x00000001
  736. #define IME_REGWORD_STYLE_USER_FIRST    0x80000000
  737. #define IME_REGWORD_STYLE_USER_LAST     0xFFFFFFFF
  738. #if(WINVER >= 0x040A)
  739. // dwFlags for ImmAssociateContextEx
  740. #define IACE_CHILDREN                   0x0001
  741. #define IACE_DEFAULT                    0x0010
  742. #define IACE_IGNORENOCONTEXT            0x0020
  743. // dwFlags for ImmGetImeMenuItems
  744. #define IGIMIF_RIGHTMENU                0x00000001
  745. // dwType for ImmGetImeMenuItems
  746. #define IGIMII_CMODE                    0x00000001
  747. #define IGIMII_SMODE                    0x00000002
  748. #define IGIMII_CONFIGURE                0x00000004
  749. #define IGIMII_TOOLS                    0x00000008
  750. #define IGIMII_HELP                     0x00000010
  751. #define IGIMII_OTHER                    0x00000020
  752. #define IGIMII_INPUTTOOLS               0x00000040
  753. // fType of IMEMENUITEMINFO structure
  754. #define IMFT_RADIOCHECK 0x00001
  755. #define IMFT_SEPARATOR  0x00002
  756. #define IMFT_SUBMENU    0x00004
  757. // fState of IMEMENUITEMINFO structure
  758. #define IMFS_GRAYED          MFS_GRAYED
  759. #define IMFS_DISABLED        MFS_DISABLED
  760. #define IMFS_CHECKED         MFS_CHECKED
  761. #define IMFS_HILITE          MFS_HILITE
  762. #define IMFS_ENABLED         MFS_ENABLED
  763. #define IMFS_UNCHECKED       MFS_UNCHECKED
  764. #define IMFS_UNHILITE        MFS_UNHILITE
  765. #define IMFS_DEFAULT         MFS_DEFAULT
  766. #endif /* WINVER >= 0x040A */
  767. // type of soft keyboard
  768. // for Windows Tranditional Chinese Edition
  769. #define SOFTKEYBOARD_TYPE_T1            0x0001
  770. // for Windows Simplified Chinese Edition
  771. #define SOFTKEYBOARD_TYPE_C1            0x0002
  772. // protype of IME APIs                                          
  773. BOOL    WINAPI ImeInquire(LPIMEINFO, LPTSTR lpszUIClass, LPCTSTR lpszOptions);                  
  774. BOOL    WINAPI ImeConfigure(HKL, HWND, DWORD, LPVOID);          
  775. DWORD   WINAPI ImeConversionList(HIMC, LPCTSTR, LPCANDIDATELIST, DWORD dwBufLen, UINT uFlag);   
  776. BOOL    WINAPI ImeDestroy(UINT);                                
  777. LRESULT WINAPI ImeEscape(HIMC, UINT, LPVOID);                   
  778. BOOL    WINAPI ImeProcessKey(HIMC, UINT, LPARAM, CONST LPBYTE); 
  779. BOOL    WINAPI ImeSelect(HIMC, BOOL);                           
  780. BOOL    WINAPI ImeSetActiveContext(HIMC, BOOL);                 
  781. UINT    WINAPI ImeToAsciiEx(UINT uVirtKey, UINT uScaCode, CONST LPBYTE lpbKeyState, LPDWORD lpdwTransBuf, UINT fuState, HIMC);      
  782. BOOL    WINAPI NotifyIME(HIMC, DWORD, DWORD, DWORD);            
  783. BOOL    WINAPI ImeRegisterWord(LPCTSTR, DWORD, LPCTSTR);        
  784. BOOL    WINAPI ImeUnregisterWord(LPCTSTR, DWORD, LPCTSTR);      
  785. UINT    WINAPI ImeGetRegisterWordStyle(UINT nItem, LPSTYLEBUF); 
  786. UINT    WINAPI ImeEnumRegisterWord(REGISTERWORDENUMPROC, LPCTSTR, DWORD, LPCTSTR, LPVOID);      
  787. BOOL    WINAPI ImeSetCompositionString(HIMC, DWORD dwIndex, LPCVOID lpComp, DWORD, LPCVOID lpRead, DWORD);              
  788. #if(WINVER >= 0x040A)                   
  789. DWORD   WINAPI ImeGetImeMenuItems(HIMC, DWORD, DWORD, LPIMEMENUITEMINFO, LPIMEMENUITEMINFO, DWORD);    
  790. #endif                                  
  791.                                                                 
  792.                                                                 
  793. #ifdef __cplusplus
  794. }
  795. #endif
  796. #endif  // _IMM_