hKL
[in] Handle to the keyboard layout.
hIMC
[in] Handle to the input context.
pSrc
[in] Address of a string value containing a null-terminated character string.
uBufLen
[in] Unsigned integer value that contains the size of the destination buffer, in bytes.
uFlag
[in] Unsigned integer value that contains action flags.
pDst
[out] Address of the CANDIDATELIST structure that receives the conversion result.
puCopied
[out] Address of an unsigned integer value that receives the number of bytes copied to the specified buffer. If uBufLen is zero, puCopied receives the number of bytes needed to receive the list.
///与笔划有关的微软的文档
//注意:几个词的翻译
当然最重要的一个:stroke order :笔划顺序
Da Yi, Array, and Internal Code
Two other input methods that build characters using radicals are the Da Yi input method and the Array input method. The Da Yi method defines 40 basic radicals, arranged on a standard 101-key keyboard and corresponding to the stroke order in which characters are handwritten. A maximum of four basic radicals make up a Chinese character. The Array input method defines 10 basic keystrokes, numbered 0 through 9, that represent basic radicals. The columns of keys beneath each number—for example, on a US keyboard the letters QAZ beneath 1 and the letters WSX beneath 2—are used to select specific characters.
Another method is the Internal Code input method, which allows the user to select a character by typing in its Big-5 code-point index.
看这里这么热闹,我来说几句吧!
To : ALNG()
API中的确有可以获得汉字的拼音的函数,但是这些API是借助输入法来实现的,因为作为一个输入法,它不仅有从拼音到汉字的功能,而且还有从汉字到拼音的功能,微软的微软输入法就有这个功能。我不敢确定我讲的你们是否都已经知道,但是肯定不是所有的人都知道,讲出来大家共同进步吧!
这里有几个API:
GetKeyboardLayoutList:得到当台计算机中安装的的输入法列表; 定义如下:
UINT GetKeyboardLayoutList(
int nBuff, // size of array
HKL FAR *lpList // array of input locale identifiers
);
Parameters
nBuff
[in] Specifies the maximum number of handles that the buffer can hold.
lpList
[out] Pointer to the buffer that receives the array of input locale identifiers
ImmEscape :得到输入法的名称;
该函数的定义如下:
LRESULT ImmEscape(
HKL hKL,
HIMC hIMC,
UINT uEscape,
LPVOID lpData
);
Parameters
hKL
[in] Input locale identifier.
hIMC
[in] Handle to the input context.
uEscape
[in] Index of the operations. For more information, see IME Escapes.
lpData
[in] Pointer to the data required for the escape specified in uEscape. Depending on the escape, when the function returns lpData may contain the result of the escape. For more information, see IME Escapes.
ImmGetConversionList: 看看这个输入法是否支持Reverse Conversion功能,如果支持则继续使用此函数,可取得组字字根信息
DWORD ImmGetConversionList(
HKL hKL,
HIMC hIMC,
LPCTSTR lpSrc,
LPCANDIDATELIST lpDst,
DWORD dwBufLen,
UINT uFlag
);
Parameters
hKL
[in] Input locale identifier.
hIMC
[in] Handle to the input context.
lpSrc
[in] Pointer to a null-terminated character string.
lpDst
[out] Pointer to a CANDIDATELIST structure that receives the conversion result.
dwBufLen
[in] Specifies the size of the destination buffer, in bytes. If this parameter is zero, the function returns the buffer size needed for the complete conversion result.
uFlag
[in] Action flag. This parameter can be one of the following values.