You can use SetCtrlAttribute to change ATTR_LABEL_TEXT on the button.
For example,
SetCtrlAttribute (panelHandle, PANEL_COMMANDBUTTON, ATTR_LABEL_TEXT,
newText);
If you're getting the text from a listbox, create a callback for the listbox with a case for EVENT_VAL_CHANGED. In that case,
call GetCtrlIndex to find the active item
call GetLabelFromIndex to get the text
call SetCtrlAttribute to label the button with the text.