Exemple
Création du message à la première activation du bouton x.
Affichage systématique à chaque activation.
Disparaît si on clique sur le bouton OK.
x = XtVaCreateManagedWidget("x",xmPushButtonWidgetClass, tete,NULL);
XtAddCallback(x, XmNactivateCallback, activercreer , "un message");
void activercreer(Widget w, String s)
if (!d) { /* on le cree */
d = XmCreateMessageDialog(w, s ,NULL,0);
XtVaSetValues(d, XtVaTypedArg, XmNdialogTitle, XmRString, s,5, NULL);
XtUnmanageChild(XmMessageBoxGetChild(d,XmDIALOG_CANCEL_BUTTON));
XtUnmanageChild(XmMessageBoxGetChild(d,XmDIALOG_HELP_BUTTON));