Hello
I can check if the mouse wheel is moved when the cursor is in my interface area, but I didn't find a way to get the wheel moving direction.
Sorry I'm not sure if what I said was clear in English or not.
I mean I want to know if the user spins the wheel upside or downside.
Both of them gives the id of 9 and it seems there is no lparam, dparam and sparam passed to the OnChartEvent();
Here is the code I've written:
Thanks.
It seems that there is no way to get the direction of the mouse wheel and the value of how much it moved in MQL4.
I hope someone can help me with win32, as I do not know how it works.
I searched a lot, there are information about it, but each of them needs some other knowledge to be understood and I wasn't able understand how to use them yet.
I have found these but don't know how to use them.
int WindowProc(int hwnd, uint uMsg, int wParam, int lParam);
#define WM_MOUSEWHEEL 0x020A
GET_WHEEL_DELTA_WPARAM
Any help would be highly appreciated.
Hello
I can check if the mouse wheel is moved when the cursor is in my interface area, but I didn't find a way to get the wheel moving direction.
Sorry I'm not sure if what I said was clear in English or not.
I mean I want to know if the user spins the wheel upside or downside.
Both of them gives the id of 9 and it seems there is no lparam, dparam and sparam passed to the OnChartEvent();
Here is the code I've written:
Thanks.
https://www.mql5.com/en/docs/constants/chartconstants/enum_chartevents#chartevent_mouse_wheel
In MT4 You can't use mouse wheel.
This is how you can detect wheel up or down in MT5
void OnChartEvent(const int id,const long& lparam,const double& dparam,const string& sparam) { bool wheelUp = dparam==120; bool wheelDown = dparam==-120; }

- www.mql5.com

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello
I can check if the mouse wheel is moved when the cursor is in my interface area, but I didn't find a way to get the wheel moving direction.
Sorry I'm not sure if what I said was clear in English or not.
I mean I want to know if the user spins the wheel upside or downside.
Both of them gives the id of 9 and it seems there is no lparam, dparam and sparam passed to the OnChartEvent();
Here is the code I've written:
Thanks.