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. a problem

a problem

Scheduled Pinned Locked Moved C / C++ / MFC
designhelpquestion
5 Posts 2 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.
  • K Offline
    K Offline
    Karavaev Denis
    wrote on last edited by
    #1

    this thing: ::SendMessage(::GetDlgItem(m_hWnd, IDC_LIST), LB_ADDSTRING, 0, (LONG) achKey); adds a string to a listbox. Is it possible to add it into a control list as a subitem or just add it? ============== www.design.kg

    C 1 Reply Last reply
    0
    • K Karavaev Denis

      this thing: ::SendMessage(::GetDlgItem(m_hWnd, IDC_LIST), LB_ADDSTRING, 0, (LONG) achKey); adds a string to a listbox. Is it possible to add it into a control list as a subitem or just add it? ============== www.design.kg

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      First of all, you need to seperate this, so you verify that the GetDlgItem call does not return NULL. Then you can use LB_INSERTSTRING, as I recall. Christian After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001

      Sonork ID 100.10002:MeanManOz

      I live in Bob's HungOut now

      K 1 Reply Last reply
      0
      • C Christian Graus

        First of all, you need to seperate this, so you verify that the GetDlgItem call does not return NULL. Then you can use LB_INSERTSTRING, as I recall. Christian After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001

        Sonork ID 100.10002:MeanManOz

        I live in Bob's HungOut now

        K Offline
        K Offline
        Karavaev Denis
        wrote on last edited by
        #3

        Like this? ::SendMessage(::GetDlgItem(m_hWnd, IDC_LIST_ACCOUNTS), LB_INSERTSTRING, 0, (LONG) achKey); its add nothing :(( and I'm sure that GetDlgItem call does not return NULL. ============== www.design.kg

        C 1 Reply Last reply
        0
        • K Karavaev Denis

          Like this? ::SendMessage(::GetDlgItem(m_hWnd, IDC_LIST_ACCOUNTS), LB_INSERTSTRING, 0, (LONG) achKey); its add nothing :(( and I'm sure that GetDlgItem call does not return NULL. ============== www.design.kg

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Karavaev Denis wrote: I'm sure that GetDlgItem call does not return NULL. I'm sure too, but that does not make your code safe. I'm not sure exactly what you want to do here - add a string to a substring ? Or do you want LB_SETITEMDATA ( associate a value with an entry ) Christian After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001

          Sonork ID 100.10002:MeanManOz

          I live in Bob's HungOut now

          K 1 Reply Last reply
          0
          • C Christian Graus

            Karavaev Denis wrote: I'm sure that GetDlgItem call does not return NULL. I'm sure too, but that does not make your code safe. I'm not sure exactly what you want to do here - add a string to a substring ? Or do you want LB_SETITEMDATA ( associate a value with an entry ) Christian After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001

            Sonork ID 100.10002:MeanManOz

            I live in Bob's HungOut now

            K Offline
            K Offline
            Karavaev Denis
            wrote on last edited by
            #5

            My app read key names from registry. I have a sample that add this names to a list box I wana do the same, but to a Control list. Is it possible? ============== www.design.kg

            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