c++ - Programmatically change combobox -


i need update combobox new value changes reflected text in it. cleanest way after comboboxhas 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

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -