?
Solved

MFC+OpenGL+ScrollView

Posted on 2004-09-21
1
Medium Priority
?
495 Views
Last Modified: 2013-11-20
I have used CScrollView for my view class in order to do scrolling in an OpenGL window. The problem is that when i scroll vertically or horizontally, the viewport does not move with the scroll bars .

Is there any method through which scrolling can be implemented in an OpenGL window so that when we scroll, it does scrolling in the same way like ordinary GDI windows.


Thank you
0
Comment
Question by:vadim85
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 375 total points
ID: 12118914
No, OpenGL doesnt take care about scrolling position or even windows viewport information. It has its own transformation matrices including translations (scrolling).
So, if you want to take effect, you must "synchronize" scrolling information with translation values. You have to trap scrolling events, vary transformation matrix values (x and y) and redraw opengl view.
You must use  glTranslate() function.
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question