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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Structure members in a listbox

Structure members in a listbox

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++
5 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.
  • C Offline
    C Offline
    Chandrasekharan P
    wrote on last edited by
    #1

    I have an application developed in mfc. Its a dialog based application. there is structure containing some members in it. I need to display the structure members in a listbox. how can i achive this?

    A R C M 4 Replies Last reply
    0
    • C Chandrasekharan P

      I have an application developed in mfc. Its a dialog based application. there is structure containing some members in it. I need to display the structure members in a listbox. how can i achive this?

      A Offline
      A Offline
      Adam Roderick J
      wrote on last edited by
      #2

      Do you want to pass your structure directly to list box function and in according that list box is added with new item, is it your need? if so then derive a class from CListBox and overload a function AddString() say CListBoxEx and your structure is struct EXData overload a function int AddString( const EXData& MyStruct ); :)

      modified on Tuesday, July 14, 2009 7:28 AM

      1 Reply Last reply
      0
      • C Chandrasekharan P

        I have an application developed in mfc. Its a dialog based application. there is structure containing some members in it. I need to display the structure members in a listbox. how can i achive this?

        R Offline
        R Offline
        Rajesh R Subramanian
        wrote on last edited by
        #3

        See CListBox::AddString()[^].

        It is a crappy thing, but it's life -^ Carlo Pallini

        1 Reply Last reply
        0
        • C Chandrasekharan P

          I have an application developed in mfc. Its a dialog based application. there is structure containing some members in it. I need to display the structure members in a listbox. how can i achive this?

          C Offline
          C Offline
          Chandrasekharan P
          wrote on last edited by
          #4

          Thanks Guys. I have solved the problem.

          1 Reply Last reply
          0
          • C Chandrasekharan P

            I have an application developed in mfc. Its a dialog based application. there is structure containing some members in it. I need to display the structure members in a listbox. how can i achive this?

            M Offline
            M Offline
            Muhammad Mazhar
            wrote on last edited by
            #5

            read each item from structure one by one and append it to some string finally add string to list box.

            Share your experience with others Check my Blog...

            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