Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!alfalfa.com!nazgul From: nazgul@alfalfa.com (Kee Hinckley) Newsgroups: comp.windows.x.motif Subject: Re: Adding standard Motif info/error/etc symbols to own widget Message-ID: <910522184247.179@sun> Date: 22 May 91 22:42:47 GMT References: <1991May22.100533.9258@jet.uucp> Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 31 > I have a need to display the standard Motif error/warning/info etc > symbols that you get in the normal Motif message dialogs in my own > widgets. > > Can this be done, and if so, how is it done ? First: // // Yes this looks really stupid, however it forces the initialization of // the dialog icons, which allows us to use them our own dialogs. // XtDestroyWidget(XmCreateMessageBox(MasterShell, "", NULL, 0)); Then: iconPixmap = XmGetPixmap(XtScreen(widget), "xm_error", fore, back); if (iconPixmap == XmUNSPECIFIED_PIXMAP) { iconPixmap = XmGetPixmap(XtScreen(widget), "default_xm_error", fore, back); } No, none of this is documented. Alfalfa Software, Inc. | Poste: The EMail for Unix nazgul@alfalfa.com | Send Anything... Anywhere 617/646-7703 (voice/fax) | info@alfalfa.com I'm not sure which upsets me more: that people are so unwilling to accept responsibility for their own actions, or that they are so eager to regulate everyone else's.