winapi - SetWindowText for combobox -
i want set text of combobox not present in combobox list. example if combobox has 3 items:
- apple
- orange
- banana
i doing selection change event of combobox.
on_cbn_selchange(idc_combo, oncomboclick) void cmmacceptctrl::oncomboclick() { cstring str; m_combo.getlbtext(m_combo.getcursel(), str); str += " test"; m_combo.setwindowtext(str); }
now if select "orange" expect text of combobox become "orange test" text not changed, "orange" in spite of fact i'm doing setwindowtext
.
is there way can have different text 1 has been selected combobox list?
this bit late, came here same question , found trick...
in on_cbn_selchange handler, can post message say
postmessage( wm_command, id_addtesttomycombotext)
and use setwindowtext in handler that.
Comments
Post a Comment