IMM.H
上传用户:qiandli
上传日期:2021-02-22
资源大小:103k
文件大小:36k
源码类别:

输入法编程

开发平台:

Visual Basic

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