mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-24 00:54:18 +08:00
tune description of MSG_CHAR
This commit is contained in:
+14
-1
@@ -104,7 +104,7 @@ The main changes in structure and functions:
|
||||
|
||||
##### Message
|
||||
|
||||
As a result, the strcuture `MSG` and all message-related functions changed.
|
||||
The strcuture `MSG` and all message-related functions changed.
|
||||
For example, the prototype of `SendMessage` changed from
|
||||
|
||||
int SendMessage (HWND hWnd, int nMsg, WPARAM wParam, LPARAM lParam)
|
||||
@@ -113,6 +113,19 @@ to
|
||||
|
||||
LRESULT SendMessage (HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
_IMPORTANT NOTE_
|
||||
|
||||
For best portability, you should use `LOBYTE_WORD16` and `HIBYTE_WORD16`
|
||||
to get the bytes of a character when you extract the bytes from `WPARAM`
|
||||
parameter of a `MSG_CHAR` message:
|
||||
|
||||
MSG_CHAR
|
||||
WORD16 ch = (WORD16)wParam;
|
||||
DWORD key_flags = (DWORD)lParam;
|
||||
byte0 = LOBYTE_WORD16 (ch);
|
||||
byte1 = HIBYTE_WORD16 (ch);
|
||||
|
||||
|
||||
##### Window callback procedure
|
||||
|
||||
Furthermore, the structure and functions to register window class,
|
||||
|
||||
+2
-2
@@ -420,11 +420,11 @@ extern "C" {
|
||||
*
|
||||
* \code
|
||||
* MSG_CHAR
|
||||
* int ch = (int)wParam;
|
||||
* WORD16 ch = (WORD16)wParam;
|
||||
* DWORD key_flags = (DWORD)lParam;
|
||||
* \endcode
|
||||
*
|
||||
* \param ch The ASCII code of the pressed key.
|
||||
* \param ch The EUC code of the pressed key.
|
||||
* \param key_flags The shift key status when this message occurred.
|
||||
*
|
||||
* \note Please use \a LOBYTE_WORD16 and \a HIBYTE_WORD16 to get the bytes
|
||||
|
||||
Reference in New Issue
Block a user