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. Owner Draw List Box & GetText()

Owner Draw List Box & GetText()

Scheduled Pinned Locked Moved C / C++ / MFC
questionlounge
2 Posts 2 Posters 3 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.
  • J Offline
    J Offline
    Jon Hulatt
    wrote on last edited by
    #1

    Hi All, Does anyone know why GetText() gives a string of random garbage when called on my owner draw list box class? If I clear the owner draw style, it behaves perfectly, but when it's set I get purely random values. Cheers jon

    using System.Beer;

    T 1 Reply Last reply
    0
    • J Jon Hulatt

      Hi All, Does anyone know why GetText() gives a string of random garbage when called on my owner draw list box class? If I clear the owner draw style, it behaves perfectly, but when it's set I get purely random values. Cheers jon

      using System.Beer;

      T Offline
      T Offline
      Terence Russell
      wrote on last edited by
      #2

      You probably already discovered what the issue is back in 2005. However, googling for the same issue in 2023 brought me here. For anyone else having the problem, you need to also set the LBS_HASSTRINGS state for the ownerdrawn listbox.

      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