How to draw rectangle where the specific position?


I used VS2019 and vtk-8.9 version.

My plan is that:
When the slide Bar(by using mfc component) is changing, drawing the rectangle on image viewer with slide bar’s value(the y-axis value).

So, I referred the Border Widget.
However, I face problems.
1) I don’t know setting an initial position and an rectangle’s size. Please recommend reference materials.
2) And then, If image viewer is changing, the border widget is not changed. How can i solve it?

Please help me a lot.