GLCanvas scrollbars

I’m wondering if it’s possible to add proper working scrollbars to the window that contains my GLCanvas?

I’ve created my window with the WS_HSCROLL | WS_VSCROLL style etc, and the scrollbars show up on my window, but where do I go from here? The scrollbars don’t actually do anything when you drag them.

Is there something I need to do to my canvas to get them to work?

So say if the GLcanvas is 800600 pixels but the window itself is only 400400, how would I get that to work?

What I want is so that when you change the size of the canvas, the scrollbars automatically change to reflect this. Kind of like when using Internet Explorer to view a large Jpeg file. As soon as it loads, the scrollbars automatically let you pan around to view it.

Sorry for my lack of knowledge, I’ve just started OGL in C++!


This is not OpenGL related. You need to react on the messages which are sent by scrollbars if you interact with them and do whatever you want with the values it provides.
Check the messages and functions here:…/scrollbars.asp