PDA

View Full Version : Use OpenGL in a scrollview



Xue
05-27-2002, 12:47 AM
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.

mikael_aronsson
05-27-2002, 01:06 AM
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

mphanke
05-28-2002, 12:33 AM
Hi,
I never used MFC but a common mistake is that people forget to call redraw func! ;-)
But I guess it makes sense to move the camera up and down when the scrollbar is moved!

Greets,

Martin