static Widget w_toplevel; /* Get Parent for Motif Dialog */ w_toplevel = (Widget)UF_UI_get_default_parent(); /* Create a DialogShell and the Main Window widget */ /* (as MainWindow) */ /* if a main window is active, then unmanage it */ if (w_main != NULL) { if (XtIsManaged(w_main)) XtUnmanageChild(w_main); } i_ac = 0; w_dialog = XmCreateDialogShell(w_toplevel,"Custom_application", a_al,i_ac); w_main = XmCreateMainWindow(w_dialog, "main", a_al, i_ac); ....