This is a discussion on How to add items in to List Box in VC++ win32 applications? within the C and C++ Programming forums, part of the Software Development category; How to add items in to List Box in VC++ win32 applications?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| We can add the items in to List Box in VC++ win32 applications using the following notification message. int index = SendDlgItemMessage(hwnd, IDC_LIST, LB_ADDSTRING, 0, (LPARAM)"Hi there!"); As you can see, this is a pretty simple task. If the list box has the LBS_SORT style, the new item will be added in alphabetical order; otherwise it will just be added to the end of the list. This message returns the index of the new item either way, and we can use this to perform other tasks on the item, such as associating some data with it. Usually this will be things like a pointer to a struct containing more information, or maybe an ID that you will use to identify the item, it's up to you.
__________________ The OXYGEN Delivers edgy, intelligent Technology to all... |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to populate items to Drop downlist without postback? | KiruthikaSambandam | ASP and ASP.NET Programming | 4 | 10-11-2008 08:39 PM |
| How to add items to dropdown list using javascript | Sundaram | HTML, CSS and Javascript Coding Techniques | 2 | 02-25-2008 07:19 AM |
| Desktop items when logging in | pcguy | Operating Systems | 0 | 07-31-2007 07:35 PM |
| Search the items with more accurate in Google | Jeyaseelansarc | 0 | 05-22-2007 10:52 PM | |
| List Items in Testplan | stephen | Software Testing | 1 | 05-16-2007 05:58 AM |