Use OpenGL in a scrollview

I must show a graphic in a scrollview. I have derived a view from CScrollView of MFC, and have showed the graphic in the view. But when I want to scroll this view, it doesn’t refresh. Please help me.

Hi !

It’s tricky to use OpenGL in a scrollview, create an ordinary view instead with OpenGL support in it and enable the scrollbars, then handle the scroll events yourself and pass the information on to your OpenGL rendering code.

Mikael

Hi,
I never used MFC but a common mistake is that people forget to call redraw func! :wink:
But I guess it makes sense to move the camera up and down when the scrollbar is moved!

Greets,

Martin