Hi there,
I'm having a little trouble changing the selection item inside a list box.
Here is the code im currently using:
Code:
void PreviousFile()
{
int iCurSel = SendMessage(GetDlgItem(hWnd, IDC_LIST), LB_GETCURSEL, (LPARAM)0, (WPARAM)0);
int iTotal = GetListBoxInfo(GetDlgItem(hWnd, IDC_LIST));
if (iCurSel = 0)
{
SendMessage(GetDlgItem(hWnd, IDC_LIST), LB_SETSEL, (LPARAM)1, (WPARAM)iTotal);
}
else
{
SendMessage(GetDlgItem(hWnd, IDC_LIST), LB_SETSEL, (LPARAM)1, (WPARAM)(iCurSel - 1));
}
PlayFile();
}
I've also tried numerous different 'LB' types to no avail.
Im using an extended ListBox style. (NOT MFC!)
Any Ideas?