Selecting Items from a multi select list box VC++ 6.0 on W2K 
Author Message
 Selecting Items from a multi select list box VC++ 6.0 on W2K

Being an entry level programmer with no mentor or real
Visual C++(6.0) education this application has been a
challenge and my current one is:
I have a new dialog box that has a multi select list box
that is populated with (toll free)numbers pulled from a
SQLServer database.  Now I am trying to take the numbers I
have selected and put them into the report table in the
On my GetSelected function I am getting an assert fail and
I'm sure my pointers or references are wrong but not sure
where.  All I can say is I obviously don't teach myself
very well.  Any assistance would be greatly appreciated.

void CDNISNumSelect::GetSelected(CStringList
        int selectedArray = NULL;      
        int totalSize= m_lbDNISNumbers->GetSelCount();      
        // it counts what I have selected
        //CListBox* m_lbDNISNumbers = (CListBox*)
        CString strSpace(" ");
        int selectSize = m_lbDNISNumbers->GetSelect
(totalSize, selectedArray);  // gets an assert fail here

        strlDNISNumbers = new CStringList(selectSize);
        CString *temp;

        for (int k = 0; k < selectSize; k++)        

                temp = (CString *)m_lbDNISNumbers-



Mon, 27 Sep 2004 04:53:18 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Count selected items of CListView while selecting

2. Multi-select tree control items?

3. multi select combo box

4. List View Selected Items

5. how to get the index of selected item in a list control

6. Selecting an item in a List View control

7. CComboBoxEx how do i make an item be the selected one in the drop down list

8. Selecting items in a virtual list

9. Using list control how to display a selected item as checked and grayed

10. Help Geting Selected Item in List Control (CListCtrl)

11. Help Geting Selected Item in List Control (CListCtrl)

12. Selecting items in drop list in ComboBox


Powered by phpBB® Forum Software