c++ - Programmatically change combobox -
i need update combobox
new value changes reflected text in it. cleanest way after combobox
has been initialised , message.
so trying craft postmessage
hwnd contains combobox
.
so if want send message it, changing selected item nth item, postmessage
like?
i guessing involve on_cbn_selchange
, can't work right.
you want combobox_setcursel:
combobox_setcursel(hwndcombo, n);
or if it's mfc ccombobox control can do:
m_combo.setcursel(2);
i imagine if you're doing manually want sendmessage rather postmessage. cbn_selchange notification control sends back you when selection changed.
finally, might want add c++ tag question.
Comments
Post a Comment