MCPcopy Create free account
hub / github.com/NetHack/NetHack / setComboBoxValue

Function setComboBoxValue

outdated/sys/wince/mhdlg.c:438–453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436}
437
438void
439setComboBoxValue(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 */
456void

Callers 1

plselInitDialogFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected