/* Notification is done in EDIT_EM_LineScroll */
if(dy) {
EDIT_EM_LineScroll(es, 0, dy);
- return MAKELONG((SHORT)dy, (BOOL)TRUE);
- }
+ return MAKELONG(dy, TRUE);
+ }
}
return (LRESULT)FALSE;
}
#endif
+
/*********************************************************************
*
* WM_CONTEXTMENU
nEUI = 2;
}
- SendMessageW(hLBox, WM_KEYDOWN, (WPARAM)key, 0);
+ SendMessageW(hLBox, WM_KEYDOWN, key, 0);
break;
case WM_SYSKEYDOWN: /* Handle Alt+up/down arrows */
if (nEUI)
SendMessageW(hCombo, CB_SHOWDROPDOWN, bDropped ? FALSE : TRUE, 0);
else
- SendMessageW(hLBox, WM_KEYDOWN, (WPARAM)VK_F4, 0);
+ SendMessageW(hLBox, WM_KEYDOWN, VK_F4, 0);
break;
}
/* If the edit doesn't want the return send a message to the default object */
if(!(es->style & ES_MULTILINE) || !(es->style & ES_WANTRETURN))
{
- DWORD dw;
+ DWORD dw;
if (!EDIT_IsInsideDialog(es)) break;
if (control) break;
- dw = SendMessageW( es->hwndParent, DM_GETDEFID, 0, 0 );
+ dw = SendMessageW(es->hwndParent, DM_GETDEFID, 0, 0);
if (HIWORD(dw) == DC_HASDEFID)
{
HWND hwDefCtrl = GetDlgItem(es->hwndParent, LOWORD(dw));
if (hwDefCtrl)
{
- SendMessageW(es->hwndParent, WM_NEXTDLGCTL, (WPARAM)hwDefCtrl, (LPARAM)TRUE);
+ SendMessageW(es->hwndParent, WM_NEXTDLGCTL, (WPARAM)hwDefCtrl, TRUE);
PostMessageW(hwDefCtrl, WM_KEYDOWN, VK_RETURN, 0);
}
}
SendMessageW(es->hwndParent, WM_NEXTDLGCTL, shift, 0);
break;
}
- return TRUE;
+ return TRUE;
}
if (EDIT_CheckCombo(es, WM_SYSKEYDOWN, key))
return 0;
}
- return DefWindowProcW(es->hwndSelf, WM_SYSKEYDOWN, (WPARAM)key, (LPARAM)key_data);
+ return DefWindowProcW(es->hwndSelf, WM_SYSKEYDOWN, key, key_data);
}
TRACE("EM_GETTHUMB: returning %ld\n", ret);
return ret;
}
- case EM_LINESCROLL:
- TRACE("EM_LINESCROLL16\n");
- dx = pos;
- break;
+ case EM_LINESCROLL:
+ TRACE("EM_LINESCROLL16\n");
+ dx = pos;
+ break;
default:
ERR("undocumented WM_HSCROLL action %d (0x%04x), please report\n",
return ret;
}
case EM_LINESCROLL:
- TRACE("EM_LINESCROLL16 %d\n", pos);
+ TRACE("EM_LINESCROLL %d\n", pos);
dy = pos;
break;
static LRESULT EDIT_EM_GetThumb(EDITSTATE *es)
{
return MAKELONG(EDIT_WM_VScroll(es, EM_GETTHUMB, 0),
- EDIT_WM_HScroll(es, EM_GETTHUMB, 0));
+ EDIT_WM_HScroll(es, EM_GETTHUMB, 0));
}
return TRUE;
cleanup:
- SetWindowLongPtrW(es->hwndSelf, 0, 0);
- HeapFree(GetProcessHeap(), 0, es->first_line_def);
- HeapFree(GetProcessHeap(), 0, es->undo_text);
- if (es->hloc32W) LocalFree(es->hloc32W);
- HeapFree(GetProcessHeap(), 0, es);
- return FALSE;
+ SetWindowLongPtrW(es->hwndSelf, 0, 0);
+ HeapFree(GetProcessHeap(), 0, es->first_line_def);
+ HeapFree(GetProcessHeap(), 0, es->undo_text);
+ if (es->hloc32W) LocalFree(es->hloc32W);
+ HeapFree(GetProcessHeap(), 0, es);
+ return FALSE;
}
pc = pp;
}
- SetWindowLongPtrW( es->hwndSelf, 0, 0 );
- HeapFree(GetProcessHeap(), 0, es->undo_text);
+ SetWindowLongPtrW( es->hwndSelf, 0, 0 );
+ HeapFree(GetProcessHeap(), 0, es->undo_text);
HeapFree(GetProcessHeap(), 0, es);
return 0;
* The messages are in the order of the actual integer values
* (which can be found in include/windows.h)
*/
-LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg,
- WPARAM wParam, LPARAM lParam, BOOL unicode )
+LRESULT EditWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, BOOL unicode )
{
EDITSTATE *es = (EDITSTATE *)GetWindowLongPtrW( hwnd, 0 );
LRESULT result = 0;
{
LPSTR textA = (LPSTR)lParam;
INT countW = MultiByteToWideChar(CP_ACP, 0, textA, -1, NULL, 0);
- if(!(textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR)))) break;
- MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, countW);
+ if (!(textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR)))) break;
+ MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, countW);
}
EDIT_EM_ReplaceSel(es, (BOOL)wParam, textW, TRUE, TRUE);
break;
case WM_MBUTTONDOWN:
- result = EDIT_WM_MButtonDown(es);
+ result = EDIT_WM_MButtonDown(es);
break;
case WM_MOUSEMOVE:
}
break;
-
- /* IME messages to make the edit control IME aware */
+
+ /* IME messages to make the edit control IME aware */
case WM_IME_SETCONTEXT:
break;