Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 217
  • Last Modified:

Regarding Scrolling

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
rajahj
Asked:
rajahj
1 Solution
 
rakeshkalraCommented:
use GetScrollPos
0
 
rajahjAuthor Commented:
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
 
gatkinsoCommented:
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now