+char *AxWin3_Widget_GetText(tAxWin3_Widget *Widget)
+{
+ char buf[sizeof(tWidgetMsg_SetText)];
+ tWidgetMsg_SetText *msg = (void*)buf;
+ tAxWin_IPCMessage *retmsg;
+ char *ret;
+
+ msg->WidgetID = Widget->ID;
+
+ AxWin3_SendMessage(Widget->Window, Widget->Window, MSG_WIDGET_GETTEXT, sizeof(buf), buf);
+
+ retmsg = AxWin3_int_WaitIPCMessage(MSG_WIDGET_GETTEXT);
+ msg = (void*)retmsg->Data;
+
+ if( retmsg->Size < sizeof(*msg) ) {
+ free(retmsg);
+ return NULL;
+ }
+
+ ret = strndup(msg->Text, retmsg->Size - sizeof(*msg));
+ free(retmsg);
+ return ret;
+}
+