Solved

MFC+OpenGL+ScrollView

Posted on 2004-09-21
1
464 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
1 Comment
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 125 total points
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Unix / Linux grid computing 5 125
if loop in java 3 114
sum67 challenge 35 88
firstChar challenge 13 82
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
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.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now