In fact if you set the mask to only scroll events :
_GUICtrlRichEdit_SetEventMask($hRichEdit, $ENM_SCROLLEVENTS)
then the WM_NOTIFY message proc can be as simple as :
Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam)
Local $tFilter = DllStructCreate($tagMSGFILTER, $lParam)
If $tFilter.hwndFrom = $hRichEdit Then _GUICtrlRichEdit_ScrollLines($tFilter.hwndFrom, $tFilter.wParam ? 1 : -1)
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_NOTIFY