Use CB_ERR instead of -1

This commit is contained in:
tomcw 2017-07-07 18:13:21 +01:00
parent 0a60a0a8aa
commit 2a916103b6

View File

@ -92,7 +92,7 @@ void CPropertySheetHelper::FillComboBox(HWND window, int controlid, LPCTSTR choi
choices += _tcslen(choices)+1;
}
if (SendMessage(combowindow, CB_SETCURSEL, currentchoice, 0) == (LRESULT)-1 && currentchoice != -1)
if (SendMessage(combowindow, CB_SETCURSEL, currentchoice, 0) == CB_ERR && currentchoice != -1)
{
_ASSERT(0);
SendMessage(combowindow, CB_SETCURSEL, 0, 0); // GH#434: Failed to set currentchoice, so select item-0