home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / mswindo / programm / misc / 1062 < prev    next >
Encoding:
Internet Message Format  |  1992-07-28  |  2.6 KB

  1. Xref: sparky comp.os.ms-windows.programmer.misc:1062 comp.windows.ms.programmer:7402
  2. Path: sparky!uunet!usna!faculty!baldwin
  3. From: baldwin@csservera.scs.usna.navy.mil (J.D. Baldwin)
  4. Newsgroups: comp.os.ms-windows.programmer.misc,comp.windows.ms.programmer
  5. Subject: Displaying L-O-N-G windows with a scrollbar
  6. Message-ID: <BALDWIN.92Jul28202059@csservera.scs.usna.navy.mil>
  7. Date: 29 Jul 92 00:20:59 GMT
  8. Sender: news@usna.NAVY.MIL
  9. Followup-To: comp.os.ms-windows.programmer.misc
  10. Organization: Comp. Sci. Dep't., U.S. Naval Academy, Annapolis, MD
  11. Lines: 41
  12.  
  13. Sorry if this is a FAQ (I can't believe that it is), but I've been
  14. looking for the FAQ every day for two weeks and haven't seen one.
  15.  
  16. In all of the following, I am using Borland C++ 3.0 with ObjectWindows
  17. under Windows 3.1 (yes, I am waiting for them to ship the upgrade to 3.1).
  18.  
  19. My problem is this: I wish to display a very long graph for the user
  20. to scroll through.  I've gotten this to work for medium-size graphs,
  21. but when I try to display all the points (some of these graphs have
  22. more than 65000 points), I get parts of the graph overwriting each
  23. other--it's a real mess.
  24.  
  25. I'm pretty sure that the problem is that MoveTo and LineTo take *int*
  26. parameters when I am trying to send *unsigned* int parameters.  So,
  27. for example, if I try to plot a point at [38000,190] it gets plotted
  28. at [5232,190] -- not what I had in mind.
  29.  
  30. So, I started messing around with Scroller -> ScrollTo() and drawing
  31. only the visible area of the graph during each Paint operation, but I
  32. realized that this wasn't going to help, since I still have to supply
  33. the "world coordinate" of the x-coordinate (the y-coordinate is not a
  34. problem, as there isn't even a vertical scroll bar; I am only
  35. interested in stretching out the x-dimension).
  36.  
  37. Does anyone have any workarounds, example code, ideas, etc. as to how
  38. I can defeat this?
  39.  
  40. If you reply by post, please e-mail me a copy of the post.  I keep up
  41. with this newsgroup, but I am 3000 miles from my news-reading machine,
  42. and I don't get real reliable telnet connections.  Also please note
  43. the address "change" below and don't use "reply."
  44.  
  45. Thanks in advance for any help or ideas.
  46.  
  47. SUMMER ADDRESS:  baldwin@spectrum.lanl.gov (Los Alamos Nat'l Labs)
  48. --
  49.  From the catapult of:              |+| "If anyone disagrees with anything I
  50.    _,_  J. D. Baldwin, Comp Sci Dept|+| say, I am quite prepared not only to
  51.  _|70|___:::)=}-  U.S. Naval Academy|+| retract it, but also to deny under
  52.  \      /   baldwin@usna.navy.mil   |+| oath that I ever said it." --T. Lehrer
  53. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  54.