Solved

ScrollView limitations

Posted on 1998-02-04
5
449 Views
Last Modified: 2013-11-19
Hi,

My main view is derived from CScrollView. Basically this view consists of bitmaps which are added to the view at regular intervals using the MM_TEXT mapmode. This view is sized dynamically using the SetScrollSizes() member function.

The problem is: The view doesn't expand beyond 32768 pixels. This is probably a limitation of Scrollview. This means that the height of my view cannot exceed 32768 pixels.

I have to go beyond this limitation. Is there any easy solution using CScrollView??

Thanks
0
Comment
Question by:wpinto
  • 3
  • 2
5 Comments
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 200 total points
ID: 1315607
CScrollView will not go beyond 32768 pixels not because of they are using short integers in the class. Rather, the basic problem is that the class relies on Windows to provide the features. However, Get and SetScrollPos() cannot take more than 32K values. Instead, Win32 programs should really use GetSetScrollInfo() which will work with more than 32K. You can create a new class derived from CView called CScrollView and copy most of the implementation over and instead of calling the 16bit scroll functions, use the 32bit ones instead.


0
 
LVL 2

Author Comment

by:wpinto
ID: 1315608
Hi thui,

Thats exactly what I tried to do. In fact CScrollView does call the 32 bit GetSetScrollInfo()... Where it fails is while converting logical points to device points LPtoDP when LP exceeds 32768. Is there some way to exceed this range for device coordinates in the 32 bit environment??

Thanks
0
 
LVL 15

Expert Comment

by:Tommy Hui
ID: 1315609
Are you using Windows 95? If so, then you're stuck because GDI is still 16 bits under Windows 95. If you're using NT though, things will work automatically. But if you need to get this to work under Win95, you'll have to do the work yourself.

Basically, you'll have to use the 16bits as an index into your real environment. For example, set up a logical area of 320,000 by 320,000 and to convert to the device units you divide by 10. So that the final device units can be represented in 16bits.


0
 
LVL 2

Author Comment

by:wpinto
ID: 1315610
Thanks for the info thui, I'll try it out.

...yes I am using Windows 95. Do you know if there's any such limitations on CListView. One of my options (apart from your suggested soln) is to replace the CScrollView with CListView. Will this work??

Thanks
0
 
LVL 15

Expert Comment

by:Tommy Hui
ID: 1315611
The limitation that exists is because of Windows 95. It does not matter which standard control you use, but if they don't do anything about using some mapping scheme, then you will have to do the work yourself. As far as I know, there isn't any such standard control.


0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
deburging in oracle form 12 105
maven archtype selection in eclipse 1 57
wordappend challenge 8 202
unix example issues 18 100
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

821 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