Share via


GetInputScopePhrases (Compact 2013)

3/28/2014

Returns the list of input phrases supported by a specified input field.

Syntax

HRESULT GetInputScopePhrases(
    HWND hwnd,
    LPWSTR **ppszPhraseList,
    UINT *pcCount
);

Parameters

  • hwnd
    [in] The input field to query.
  • ppszPhraseList
    [out] Returns an array of strings that includes all of the phrases supported by hwnd.
  • pcCount
    [out] Returns the number of phrases included in ppszPhraseList.

Return Value

Returns S_OK if successfull.

Returns ERROR_INVALID_WINDOW_HANDLE if hwnd is NULL, or E_INVALIDARG if hwnd is not a valid handle in the current process.

Returns E_OUTOFMEMORY if it cannot allocate enough memory to return the phrases.

Remarks

If the input field does not have a phrase list set, GetInputScopePhrases sets ppszPhraseList to NULL and pcCount to 0.

Code Example

The following code shows how to get phrases from a window.

LPWSTR* lpWstrPhrases = NULL;
UINT cCount = 0;
GetInputScopePhrases(hwnd, &lpWstrPhrases, &cCount);

Requirements

Header

inputscope.h

See Also

Reference

Input Scope Functions
InputScope
Input Method Editor Reference