Link to home
Start Free TrialLog in
Avatar of khaotiksociety
khaotiksociety

asked on

Please help me asap! Combo Box + List Control Error

Program Layout:

Cedit = m_strFile   // Prints the path of the file which contains the album (mp3's)
ComboBox = m_ComboBands // A list of bands
List Control = m_MyAlbums // the name of the bands albums
Button1 = Browse
Button2 = Rename
Button3 = Stop

What this program does is... once a file is selected. You then select which band it is on the comb box and then the list control shows the current bands album names, after selecting one you press rename and it renames the mp3's in the selected file.

Since you have an idea of my program. I have been having problems with getting the selection of the combo box to the list control. After compileing my code, i select a 311 and it displays both 311 and Adema. Please help me!

Heres my code.....

void CMp3RenamerDlg::OnSelchangeCombo1()
{
     char nSelection = m_ComboBands.GetCurSel();

     if( nSelection != LB_ERR )
     {
          if( nSelection, "311" )
          {
                                            m_MyAlbums.DeleteAllItems();
                m_MyAlbums.InsertItem(0, _T( "Music" ));
                m_MyAlbums.SetItemText(0,1, "1993");
               m_MyAlbums.InsertItem(0, _T("Self Titled"));
               m_MyAlbums.SetItemText(0,1, _T("1996"));
                 m_MyAlbums.InsertItem(0, _T("Transistor"));
                m_MyAlbums.SetItemText(0,1, _T("1997"));
               m_MyAlbums.InsertItem(0, _T("Live"));
               m_MyAlbums.SetItemText(0,1, _T("1998"));
                m_MyAlbums.InsertItem(0, _T("Soundsystem"));
                m_MyAlbums.SetItemText(0,1, _T("1999"));
               m_MyAlbums.InsertItem(0, _T("Grassroots"));
               m_MyAlbums.SetItemText(0,1, _T("2000"));
                m_MyAlbums.InsertItem(0, _T("From Chaos"));
                m_MyAlbums.SetItemText(0,1, _T("2001"));
               m_MyAlbums.InsertItem(0, _T("Evolver"));
               m_MyAlbums.SetItemText(0,1, _T("2003"));
          }
          if( nSelection, "Adema" )
          {
                                              m_MyAlbums.DeleteAllItems();
               m_MyAlbums.InsertItem(0, _T("Self Titled"));
               m_MyAlbums.SetItemText(0,1, _T("2001"));    
          }
     }
}
ASKER CERTIFIED SOLUTION
Avatar of martynjpearson
martynjpearson

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial