I got same result as Nine :
#include <GuiRichEdit.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Local $hGUI = GUICreate('Test GUI', 200, 200, -1, -1)
Local $hRichEdit = _GUICtrlRichEdit_Create($hGUI, '', 20, 20, 160, 160, BitOR($ES_MULTILINE, $ES_AUTOVSCROLL), $WS_EX_TRANSPARENT) ;Yes $WS_VSCROLL is not enabled
_GUICtrlRichEdit_SetEventMask($hRichEdit, $ENM_SCROLLEVENTS) ;$ENM_SCROLLEVENTS - Sends EN_MSGFILTER notifications for mouse wheel events
For $i = 1 To 20
_GUICtrlRichEdit_AppendText($hRichEdit, $i & ' - this is a test message' & @CRLF)
Next
GUIRegisterMsg($WM_NOTIFY, 'WM_NOTIFY')
GUISetState(@SW_SHOW, $hGUI)
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
_GUICtrlRichEdit_Destroy($hRichEdit)
GUIDelete($hGUI)
Exit
EndSwitch
WEnd
Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam)
#forceref $hWnd, $iMsg, $wParam
Local $tNMHDR = DllStructCreate($tagNMHDR, $lParam)
; Local $tMsgFilter = DllStructCreate($tagMSGFILTER, $lParam)
Switch DllStructGetData($tNMHDR, 'hWndFrom')
Case $hRichEdit
Switch DllStructGetData($tNMHDR, 'Code')
Case $EN_MSGFILTER
Local Static $iCounter = 0
$iCounter += 1
ConsoleWrite("$EN_MSGFILTER " & $iCounter & @crlf)
; reminder $tagMSGFILTER = "align 4;" & $tagNMHDR & ";uint msg;wparam wParam;lparam lParam"
Local $tMsgFilter = DllStructCreate($tagMSGFILTER, $lParam)
ConsoleWrite("$tMsgFilter.msg = " & $tMsgFilter.msg & " $tMsgFilter.wparam = " & $tMsgFilter.wparam & _
" $tMsgFilter.lparam = " & $tMsgFilter.lparam & @crlf)
If DllStructGetData($tMsgFilter, 'msg') <> 0 Then
ConsoleWrite('Scroll ' & DllStructGetData($tMsgFilter, 'msg') & @CRLF & @CRLF)
EndIf
EndSwitch
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc
Scite Console, after mousewheel scrolled down ($tMsgFilter.wparam = 1) then mousewheel scrolled up ($tMsgFilter.wparam = 0)
$EN_MSGFILTER 1
$tMsgFilter.msg = 277 $tMsgFilter.wparam = 1 $tMsgFilter.lparam = 0
Scroll 277
$EN_MSGFILTER 2
$tMsgFilter.msg = 277 $tMsgFilter.wparam = 0 $tMsgFilter.lparam = 0
Scroll 277