Guest_imported
New member
- Jan 1, 1970
- 0
HI,
In one function of my programm, I open a dialog box with 2 lists and 2 buttons.
in the first list, I have the title of the differents opened windows in my programm (MDI application).
When I click on the first button, I would like that the selected item in my first list was transfered in my second list (in this function, the user make a choice of differents files he needs).
I have made this code for the button function
void CMulxDlg::OnEinfugen()
{
for (int i = 0 ; i < m_listBox.GetCount(); i++ )
{
if ((m_listBox.GetSel(i)) != 0)
{
m_listBox2.AddString(aStrings);
m_listBox.DeleteString(i);
aStrings.RemoveAt( i, 1 );
}
}
}
m_listBox : first listbox
m_listBox2 : second listbox
aStrings : a CStringArray with the title of opened windows
When I select all files, I have an assertion failed.
I don't know why
Someone can help me ?
Thanks!
In one function of my programm, I open a dialog box with 2 lists and 2 buttons.
in the first list, I have the title of the differents opened windows in my programm (MDI application).
When I click on the first button, I would like that the selected item in my first list was transfered in my second list (in this function, the user make a choice of differents files he needs).
I have made this code for the button function
void CMulxDlg::OnEinfugen()
{
for (int i = 0 ; i < m_listBox.GetCount(); i++ )
{
if ((m_listBox.GetSel(i)) != 0)
{
m_listBox2.AddString(aStrings);
m_listBox.DeleteString(i);
aStrings.RemoveAt( i, 1 );
}
}
}
m_listBox : first listbox
m_listBox2 : second listbox
aStrings : a CStringArray with the title of opened windows
When I select all files, I have an assertion failed.
I don't know why
Someone can help me ?
Thanks!