Skip to content
This repository was archived by the owner on Feb 9, 2021. It is now read-only.

Latest commit

 

History

History
<!--TO READ THIS HELP FILE, RIGHT-CLICK ON THE FILE NAME IN THE
    SOLUTION EXPLORER PANE AND SELECT "VIEW IN BROWSER"-->

<html><head><title>IME Sample: Demonstrates How to Control IME Mode and Implement IME Level 3</title></head><body><h1>IME Sample: Demonstrates How to Control IME Mode and Implement IME Level 3</h1><div id="mainSection"><div id="mainBody"><div id="allHistory" class="saveHistory" onsave="saveAll()" onload="loadAll()"></div><p /><p>The IME sample uses <code>CIMEEdit</code>, a subclass of <b>CEdit</b>, to create an edit control. <code>CIMEEdit</code> handles all input characters, and it composes DBCS strings. The sample has the following features:  </p><ul><li><p>It shows how to control IME mode using C/C++. You can set the initial IME mode of <code>CIMEEdit</code> as to input language, shape, and so on. If you want your edit control initially set to get Korean characters, you can add code as in this sample. Also, if you want only English, you can disable IME.</p></li><li><p>It also shows how to implement IME level 3 in your source code. IME level 3 is more convenient and powerful for East Asian users. You can create a custom control or window that supports IME level 3 using this sample. </p></li><li><p>This sample determines the font and code page used for Ansi-Unicode conversion by the keyboard layout so that you can try four different IMEs for all East Asian languages without changing either font or code page. This is a feature of Windows 2000 and is not a requirement for support of IME level 3.</p></li><li><p>The function <code>GetCombinedCharLength</code> supports only surrogate characters in this sample. If you need to support combined characters, add your code to the method.</p></li></ul><p>To use IME functions, your program must include IMM.H and link with IMM32.LIB.</p><div class="alert"><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Security Note </th></tr><tr><td><p>This sample code is provided to illustrate a concept and should not be used in applications or Web sites, as it may not illustrate the safest coding practices.</p></td></tr></table></div><h1 class="heading">Building and Running the Sample</h1><div id="sectionSection0" class="seeAlsoNoToggleSection"><div class="alert"><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Note </th></tr><tr><td><p>If you are running Visual C++ Express Edition, you might need to install the Platform SDK before running this sample. For information on how to do this, see <MSHelp:link keywords="971463b4-7178-42cc-87b4-566295b7ae50" tabindex="0" >How to: Use Visual C++ Express Edition with the Microsoft Platform SDK</MSHelp:link>.</p></td></tr></table></div><h4 class="subHeading">To build and run this sample</h4><div class="subSection"><ol><li><p>Open the solution IME.sln.</p></li><li><p>From the <b>Build</b> menu, click <b>Build</b>.</p></li><li><p>From the <b>Debug</b> menu, click <b>Start Without Debugging</b>.</p></li></ol></div><p>Run the sample and try out the following features.</p><sections ><h4 class="subHeading" xmlns="">Control IME Mode</h4><div class="subSection" xmlns=""><ul><li><p>You can change IME mode using check boxes. If you change options using check boxes, the status of the IME window will be changed.</p></li><li><p>You can change IME mode using the IME window. If you change options using the IME window, check boxes in the sample will be changed.</p></li><li><p>You can enable or disable IME.</p></li></ul></div><h4 class="subHeading" xmlns="">Implement IME Level 3</h4><div class="subSection" xmlns=""><ul><li><p>If you input double-byte characters, you can see how to composite strings.</p></li><li><p>If you have the proper font on Windows 2000, you can see surrogate characters.</p></li></ul></div></sections></div><h1 class="heading">Classes and Keywords</h1><div id="sectionSection1" class="seeAlsoNoToggleSection"><p>This sample demonstrates the following classes:</p><p>CEdit</p><p>This sample demonstrates the following keywords:</p><p>CBitmap::OnPaint; CEdit::OnChar; CEdit::OnSetFocus; CEdit::OnKillFocus; CEdit::OnKeyDown; CEdit::WindowProc; ImmGetContext; ImmReleaseContext; ImmGetConversionStatus; ImmSetConversionStatus; ImmGetOpenStatus; ImmSetOpenStatus; ImmAssociateContext; ImmNotifyIME; ImmGetCompositionString; ImmGetProperty; ImmSetCandidateWIndow; ImmSetCompositionWIndow</p></div></div><div id="footer"><div class="footerLine"></div>
          © Microsoft Corporation. All rights reserved.  Send <a href="mailto:DevDocs@microsoft.com?subject=Documentation Feedback :IME Sample: Demonstrates How to Control IME Mode and Implement IME Level 3">comments</a> about this topic to Microsoft.
      </div></div></body></html>