2 openGL objects in 2 windows

Hi,

I have 2 OpenGL objects in 2 different windows.
In the bigger window I show OpenGL object sometimes big than window (and by that way getting scrollbars). In the small window I show optimized OpenGL object to window.

When I do refresh of application window (I am working with MDI windows) the scrollbars sets to zero. It happends after I am calling MakeCurrent to the small window or the big window.

What I need to do that scrollbars stay and doesn't change to zero

Thank's
Alexei



Answer this question

2 openGL objects in 2 windows

  • DaveHorner

    Assuming you're using VS 2005 and you're scrollbars came from a ScrollableControl (Panel, UserControl, Form, etc) with AutoScroll set to true, you can use the Value property off the HorizontalScroll and VerticalScroll properties. 

    Get the Value property when storing the old setting and set the Value to restore it.

     - mike

  • vb.net_curious

    I don't think there are many folks with OpenGL experience on this forum.  If you could include some code showing how you're getting said OpenGL objects on your Form it may provide insight.

    thanks
    - mike

  • Kunk

    Hi,

    I don't have VS 2005. We have registered version of VS 2003 and I am working with .NET 1.1. So I am using AutoScroll but it doesn't helps. After I am calling MakeCurrent to OpenGL object that placed on panel with scrolls it reset scrollbars to zero.

    How can I solve it

    Thank's
    Alexei

  • Jeremy Adamich

    Alexi I'm sorry, but I can't really answer your question but I'm hoping you can answer mine!

    It sounds like you've gotten OpenGL working in a Windows.Form - can you give me any tips on where you saw how to do it.

    At the moment I can draw using GDI+ using the CreateGraphics() function on a picture box.  However I have been unable to get OpenGL running in a Windows.Forms/C++ environment.  gl.h appears to require windows.h included which my understanding it isn't used in the .NET framework...

    If you or anyone else can give me some tips that'd be great!

    thanks,  Dave

  • Amanda Jamin

    Hi,

    Try to find Tao Open Source Project.

    Thank's
    Alexei

  • GregTech

    Hi,

    I can't put my code there becouse it's long... (something about 100,000 lines)
    I need to understand how to save scrollbars status and it must be same after makecurrent functions calls.

    I have checked it's happend when the big openGL call to makecurrent on repaint.

    How can I solve it

    Thank's
    Alexei



  • 2 openGL objects in 2 windows