home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / mswindo / programm / misc / 1509 < prev    next >
Encoding:
Internet Message Format  |  1992-08-26  |  2.4 KB

  1. Path: sparky!uunet!lax.pe-nelson.com!lax!twbrown
  2. From: twbrown@PE-Nelson.COM (Tom W. Brown)
  3. Newsgroups: comp.windows.ms.programmer,comp.os.ms-windows.programmer.misc
  4. Subject: Re: Question about Listbox 64K barrier
  5. Message-ID: <598@lax.lax.pe-nelson.com>
  6. Date: 26 Aug 92 18:14:31 GMT
  7. References: <k+bn2wq.sam@netcom.com>
  8. Sender: news@lax.pe-nelson.com
  9. Followup-To: comp.windows.ms.programmer
  10. Distribution: usa
  11. Organization: PE-Nelson
  12. Lines: 43
  13.  
  14. In article <k+bn2wq.sam@netcom.com>, sam@netcom.com (Samuelson S. Rehman) writes:
  15. |> 
  16. |> I'm a M2 UNIX programmer and programming in MS Windows is pretty new to me.
  17. |> 
  18. |> I'm writing a program that can allow a user to select a record from
  19. |> a listbox. Now this list of record can easily exceed the 64K barrier.
  20. |> So my questions are:
  21. |> 
  22. |>     1. How can I interrupt the user when he's trying to scroll down/up,
  23. |>     so I can load the next/prev 64K segment from the file ?
  24. |> 
  25. |>     2. And even if that can be done, how do I maintain the scrollbar to
  26. |>     show the position of the bar within the whole database, but not
  27. |>     just within the 64K segment ??
  28. |> 
  29.  
  30. Both of these concerns can be addressed by using an "OWNERDRAW" listbox.  Check
  31. the documentation for CreateWindow with regard to the LBS_OWNERDRAWFIXED or
  32. LBS_OWNERDRAWVARIABLE styles.
  33.  
  34. In a nutshell, these styles allow you to have a listbox where Windows does
  35. not need to store strings for each item in the list, rather a message is
  36. sent back to your application whenever a list item needs to be displayed (c.f.
  37. WM_DRAWITEM) allowing you to perform whatever file/memory buffering you
  38. desire.
  39.  
  40. |>     3. If that is totally impossible, can anyone tell me where can
  41. |>     I find information (books maybe) about writing a widget ( or
  42. |>     whatever it's called in MS Windows ) ?
  43.  
  44. The definitive documentation is probably the SDK (Software Developer's Kit)
  45. manual set from Microsoft Press, but there are plenty of books available that 
  46. do a better job of "teaching" windows programming -- one of my favorites has
  47. always been Charles Petzold's book.
  48.  
  49. Good luck,
  50.  
  51.  
  52. ----------------------------------------------------------------------------
  53. Tom Brown               |  "Strange women, lying in ponds, distributing
  54. PE Nelson Systems       |   swords is no basis for a system of government."
  55. twbrown@pe-nelson.com   |                    Monty Python and the Holy Grail
  56. ----------------------------------------------------------------------------
  57.