winapi - SetWindowText for combobox -


i want set text of combobox not present in combobox list. example if combobox has 3 items:

  1. apple
  2. orange
  3. 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

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -