How to prevent the chart in the background from moving with the control object?

 

Hi all, 

I've been struggling with this a bit.

In short, what I would like to ask is how to prevent the chart from moving when dragging a control object?

Please refer to the animated gif below. The object is created using a CButton class (MT4).
And with a not so elegant method, I could somehow make it move when I click on it and drag.
However, the problem is, the background is also moving which is not desired.

I believe there must be a way to somehow fix the chart the back.

Short clip showing the behavior

Hopefully, my question is clear.

Thank you for your advice in advance.

 

Oh!!! I just realized how to use CHART_MOUSE_SCROLL.

By using, ChartSetInteger(0, CHART_MOUSE_SCROLL, false), it will freeze the background.

Anyway, I will leave the post here, just in case, others might somehow find it helpful.