| 436 | } |
| 437 | |
| 438 | void |
| 439 | setComboBoxValue(HWND hWnd, int combo_box, int value) |
| 440 | { |
| 441 | int index_max = SendDlgItemMessage(hWnd, combo_box, CB_GETCOUNT, 0, 0); |
| 442 | int index; |
| 443 | int value_to_set = LB_ERR; |
| 444 | for (index = 0; index < index_max; index++) { |
| 445 | if (SendDlgItemMessage(hWnd, combo_box, CB_GETITEMDATA, |
| 446 | (WPARAM) index, 0) == value) { |
| 447 | value_to_set = index; |
| 448 | break; |
| 449 | } |
| 450 | } |
| 451 | SendDlgItemMessage(hWnd, combo_box, CB_SETCURSEL, (WPARAM) value_to_set, |
| 452 | 0); |
| 453 | } |
| 454 | |
| 455 | /* initialize player selector dialog */ |
| 456 | void |