static void MakeLabel( int index, char *name, char *label ) { if( GUIGetWindowText( MDIWindows[index], name, MAX_LENGTH - 3 ) == 0 ) { name[0] = '\0'; } sprintf( label, "&%d %s", index + 1, name ); }
static void DlgInit( gui_window *wnd, void *param ) { char buffer[MAX_LENGTH]; dlg_init *info; info = (dlg_init *)param; TotalWindows++; ChildWindows[TotalWindows-1] = wnd; if( GUIGetWindowText( wnd, buffer, sizeof( buffer ) ) != 0 ) { GUIAddText( info->dlg_wnd, info->list_id, buffer ); } else { GUIAddText( info->dlg_wnd, info->list_id, "" ); } if( wnd == GUICurrWnd ) { GUISetCurrSelect( info->dlg_wnd, info->list_id, TotalWindows - 1 ); } }
extern int WndGetTitle( a_window *wnd, char *buff, unsigned buff_len ) { return( GUIGetWindowText( wnd->gui, buff, buff_len ) ); }