sizeY = newSizeY;\r
}\r
}\r
- SendDlgItemMessage( hDlg, OPT_CommentText, EM_SETEVENTMASK, 0, ENM_MOUSEEVENTS );\r
+ SendDlgItemMessage( hDlg, OPT_CommentText, EM_SETEVENTMASK, 0, ENM_MOUSEEVENTS | ENM_KEYEVENTS );\r
return FALSE;\r
\r
case WM_COMMAND: /* message: received a command */\r
if( wParam == OPT_CommentText ) {\r
MSGFILTER * lpMF = (MSGFILTER *) lParam;\r
\r
- if( lpMF->msg == WM_RBUTTONDOWN && (lpMF->wParam & (MK_CONTROL | MK_SHIFT)) == 0 ) {\r
+ if( lpMF->msg == WM_RBUTTONDOWN && (lpMF->wParam & (MK_CONTROL | MK_SHIFT)) == 0 ||\r
+ lpMF->msg == WM_CHAR && lpMF->wParam == '\022' ) {\r
POINTL pt;\r
LRESULT index;\r
\r
pt.x = LOWORD( lpMF->lParam );\r
pt.y = HIWORD( lpMF->lParam );\r
\r
+ if(lpMF->msg == WM_CHAR) {\r
+ CHARRANGE sel;\r
+ SendDlgItemMessage( hDlg, OPT_CommentText, EM_EXGETSEL, 0, (LPARAM) &sel );\r
+ index = sel.cpMin;\r
+ } else\r
index = SendDlgItemMessage( hDlg, OPT_CommentText, EM_CHARFROMPOS, 0, (LPARAM) &pt );\r
\r
hwndText = GetDlgItem(hDlg, OPT_CommentText); // cloned from above\r