WINGs: add function to get button caption

This patch is adding a new function WMGetButtonText to get the button caption.