ImeConfigure


BOOL ImeConfigure(HKL hKL, HWND hWnd, DWORD dwMode, LPVOID lpData )

Provides a dialog box to request optional information for an IME.

hKL

Handle of the keyboard layout for the IME.

hWnd

Parent window handle

dwMode

Mode of the dialog box. It can be one of these values:

IME_CONFIG_GENERAL

The dialog box for general purpose configuration.

IME_CONFIG_REGWORD

The dialog box for registered word.

IME_CONFIG_SELECTDICTIONARY

The dialog box for selecting the dictionary of the IME.


lpData

Address of a REGISTERWORD structure if dwMode is IME_CONFIG_REGISTERWORD. Otherwise, lpData should be NULL.

This also can be NULL with IME_CONFIG_REGISTER mode if no initial string information is given.

An IME checks lpData as shown in the following pseudo code:


if (dwmode != IME_CONFIG_REGISTERWORD) {
         // Does original execution
} else if (IsBadReadPtr(lpdata, sizeof(REGISTERWORD))==FALSE) {
    if (IsBadStringPtr(PREGISTERWORD(lpdata)->lpReading, 
            (UINT)-1)==FALSE) {
        // Set the reading string to word-registering dialog box
    }
   if (IsBadStringPtr(PREGISTERWORD(lpdata)->lpWord, 
            (UINT)-1)==FALSE) {
        // Set the word string to word-registering dialog box
   }
}