CWnd::OnUniChar
The framework calls this member function when a key is pressed. That is, the current window has the keyboard focus and a WM_KEYDOWN message is translated by the TranslateMessage function.
afx_msg void OnUniChar(
UINT nChar,
UINT nRepCnt,
UINT nFlags
);
Parameters
Parameter |
Description |
||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
[in] nChar |
Specifies the character code of the pressed key. |
||||||||||||||
[in] nRepCnt |
Specifies the repeat count for the current message. The value is the number of times the keystroke is autorepeated as a result of the user holding down the key. If the keystroke is held long enough, multiple messages are sent. However, the repeat count is not cumulative. |
||||||||||||||
[in] nFlags |
Flags that specify the scan code, extended key, context code, previous key state, and transition state, as shown in the following table:
|
Remarks
This method receives the WM_UNICHAR notification, which is described in the Windows SDK. The WM_UNICHAR message is designed to send or post Unicode characters to ANSI windows. It is equivalent to the WM_CHAR message, but uses Unicode Transformation Format-32 encoding (UTF-32), whereas the WM_CHAR message uses UTF-16.
참고
This member function is called by the framework to allow your application to handle a Windows message. The parameters passed to your function reflect the parameters received by the framework when the message was received. If you call the base-class implementation of this function, that implementation will use the parameters originally passed with the message and not the parameters you supply to the function.
Requirements
Header: afxwin.h
This method is supported in Windows Vista and later.
Additional requirements for this method are described in Build Requirements for Windows Vista Common Controls.