- Timestamp:
- Jul 31, 2003, 2:25:57 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/oslibmsgtranslate.cpp
r10185 r10189 1 /* $Id: oslibmsgtranslate.cpp,v 1.11 1 2003-07-28 11:27:46sandervl Exp $ */1 /* $Id: oslibmsgtranslate.cpp,v 1.112 2003-07-31 12:25:57 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 37 37 #include <winscan.h> 38 38 #include <winkeyboard.h> 39 #include <winnls.h> 39 40 #include "hook.h" 40 41 #include "user32api.h" … … 56 57 57 58 //****************************************************************************** 59 // 60 // setThreadQueueExtraCharMessage: queues WM_CHAR message so it is retrieved 61 // by GetMessage & PeekMessage 62 // 63 // NOTE: Automatically converts ascii character code to UTF-16 if the target 64 // window is unicode. 65 // 58 66 //****************************************************************************** 59 67 BOOL setThreadQueueExtraCharMessage(TEB* teb, MSG* pExtraMsg) … … 63 71 // there's still an already translated message to be processed 64 72 return FALSE; 73 74 //Unicode windows expect the character code in UTF-16 75 if(IsWindowUnicode(pExtraMsg->hwnd)) 76 { 77 CHAR charA; 78 WCHAR charW; 79 80 charA = pExtraMsg->wParam; 81 MultiByteToWideChar(CP_ACP, 0, &charA, 1, &charW, 1); 82 pExtraMsg->wParam= charW; 83 dprintf(("setThreadQueueExtraCharMessage: Convert to Unicode src=%x res=%x", charA, charW )); 84 } 85 65 86 teb->o.odin.fTranslated = TRUE; 66 87 memcpy(&teb->o.odin.msgWCHAR, pExtraMsg, sizeof(MSG)); … … 1161 1182 // insert message into the queue 1162 1183 setThreadQueueExtraCharMessage(teb, &extramsg); 1184 1163 1185 return TRUE; 1164 1186 }
Note:
See TracChangeset
for help on using the changeset viewer.