use _MGCHARSET_UNICODE marco for ToUnicode and ToAscii functions

This commit is contained in:
WEI Yongming
2017-11-08 23:48:43 +08:00
parent 28ee251ce8
commit 127ab35eea

View File

@@ -2667,12 +2667,19 @@ MG_EXPORT int GUIAPI PostQuitMessage (HWND hWnd);
*/
MG_EXPORT BOOL GUIAPI SetKeyboardLayout (const char* kbd_layout);
#ifdef _MGCHARSET_UNICODE
#include <stddef.h>
#include <stdlib.h>
MG_EXPORT int GUIAPI ToUnicode (UINT keycode, const BYTE* kbd_state,
wchar_t* wcs, int wcs_len, const char* kbd_layout);
MG_EXPORT int GUIAPI ToAscii (UINT keycode, const BYTE* kbd_state,
WORD* ch, const char* kbd_layout);
#endif /* _MGCHARSET_UNICODE */
/**
* \fn BOOL TranslateMessage (PMSG pMsg)
* \brief Translates key down and key up messages to MSG_CHAR