The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Tam on January 27, 2008, 02:18:59 PM

Title: how to modify a item string(listbox)
Post by: Tam on January 27, 2008, 02:18:59 PM
"LB_GETTEXT" can get a listbox item string, but how to set it? I can't find a message like "LB_SETTEXT" or "LB_SETITEMTEXT" in MSDN.

in vb, I can do it like this:
List1.List(0) = "I can modify it"

but in sdk, how ?

thanks!
Title: Re: how to modify a item string(listbox)
Post by: Jimg on January 27, 2008, 02:27:39 PM
afaik you have to lb_deletestring and lb_addstring.
Title: Re: how to modify a item string(listbox)
Post by: ToutEnMasm on January 27, 2008, 03:54:04 PM
Hello,
You have to make a choice between further items in the listbox.
LB_GETTEXT for the specified selection
LB_GETCURSEL to know the selected item
LB_SETSEL  to select the index

Title: Re: how to modify a item string(listbox)
Post by: jj2007 on January 27, 2008, 04:05:27 PM
First send LB_DELETESTRING, then LB_INSERTSTRING. No other option, sorry...