Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Adding more than 32,767 items to a CListBox

Adding more than 32,767 items to a CListBox

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hamzeh
    wrote on last edited by
    #1

    Am trying to add more than 32,767 items to a CListBox using AddString ( or even InsertString), and it's not working on Windows 98 although it works on Windows NT and Windows 2000, so what is the solution for this problem knowing that i want to use the CListbox class in my solution ......

    T M M 3 Replies Last reply
    0
    • H Hamzeh

      Am trying to add more than 32,767 items to a CListBox using AddString ( or even InsertString), and it's not working on Windows 98 although it works on Windows NT and Windows 2000, so what is the solution for this problem knowing that i want to use the CListbox class in my solution ......

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      You can't overcome this listbox limit on Win9x. Even if you could, it's not a very good idea to present the user with thousands of items. Anyway, seems that you'll have to switch to CListCtrl, and probably use LVS_OWNERDATA style. Tomasz Sowinski -- http://www.shooltz.com

      1 Reply Last reply
      0
      • H Hamzeh

        Am trying to add more than 32,767 items to a CListBox using AddString ( or even InsertString), and it's not working on Windows 98 although it works on Windows NT and Windows 2000, so what is the solution for this problem knowing that i want to use the CListbox class in my solution ......

        M Offline
        M Offline
        Michael Dunn
        wrote on last edited by
        #3

        The old User controls (like the listbox) still have legacy 16-bit limitations, thus the 32K items limit (32K is the max value for a signed 16-bit int). --Mike-- http://home.inreach.com/mdunn/ #include "witty_sig.h" :love: your :bob: with :vegemite: and :beer:

        1 Reply Last reply
        0
        • H Hamzeh

          Am trying to add more than 32,767 items to a CListBox using AddString ( or even InsertString), and it's not working on Windows 98 although it works on Windows NT and Windows 2000, so what is the solution for this problem knowing that i want to use the CListbox class in my solution ......

          M Offline
          M Offline
          Mark Terrano
          wrote on last edited by
          #4

          Store your own array of items, then use a small list box to display a selected number of them. Use your own slider control and fill the 10 or 20 or however many you are displaying from an index into your own array. Its probably faster anyway. --Mark Terrano

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups