Solved

Regarding Scrolling

Posted on 1998-10-28
3
195 Views
Last Modified: 2013-11-20
Hai,
I have two window one is Main window ( nothing but CScrollView) and the other is Outputwindow which is nothing but CListbox ( Note: same as VC ide).
Main Window has lot of rect objects. ie I am drawing
a chart which has connected rect objects.

When I there is any error present in the outputwindow,I have to go to that particular rect object which has the error.
RectObject has logical points.

CScrollView has also Zoom facility.

I am unable to go to that particular rect ( because of normal as well zoom view).

Whether there is any function which gives the current scroll position?

Eagerly waiting for the reply.

Rajah J
0
Comment
Question by:rajahj
3 Comments
 

Expert Comment

by:rakeshkalra
ID: 1323964
use GetScrollPos
0
 

Author Comment

by:rajahj
ID: 1323965
GetScrollPos doesn't return properly.
Even when my view doesn't have horizontal scroll it returns the value.
So I don't think so this function is suitable to me.

When my zoom value is less than 100( there is no horizontal and vertical scroll) then also getscrollpos returns the value.

Thanks for the eagerly reply and awaiting for more.

0
 

Accepted Solution

by:
gatkinso earned 50 total points
ID: 1323966
CPOint CScrollView::GetScrollPosition
return the horizontal and vertical positions (in logical units) of the scroll boxes as a CPoint object. Call GetScrollPosition when you need the current horizontal and vertical positions of the scroll boxes in the scroll bars. This coordinate pair corresponds to the location in the document to which the upper-left corner of the view has been scrolled.

GetScrollPosition returns values in logical units. If you want device units, use GetDeviceScrollPosition instead.

This IS the answer you are looking for (even if you don't like it).

0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Detect CR LF to each line 12 161
Shell script to login to remote m/c and execute commands 10 78
if loop in java 3 142
Not needed 13 112
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…
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
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.

777 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