Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!ECHO.CANBERRA.EDU.AU!jan From: jan@ECHO.CANBERRA.EDU.AU (Jan Newmarch) Newsgroups: comp.windows.x.motif Subject: Re: Application Icons Message-ID: <9009200312.AA05038@golf.canberra.edu.au> Date: 20 Sep 90 17:12:52 GMT References: <9009192157.AA08766@alphalpha.com> Sender: usenet@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 35 > > I'm sure this has been discussed here before but I can't seem to find > any record of it. Does anyone have a working example of setting the > application icon from within the application? I followed the code in Nye & O'Reilly vol 4 X Toolkit Intrinsics Programming Manual p.278 and it worked fine. At least it did on a 32x32 icon. On a 16x16 icon I only got the default icon. This was mwm version 1.0, running on an Apollo using both the Apollo and a 386 for servers. The bits were created using bitmap. #include "ruler.bits" Pixmap icon_pixmap; Widget toplevel; toplevel = XtInitialise(...); icon_pixmap = XCreateBitmapFromData(XtDisplay(toplevel), RootWindowOfScreen(XtScreen(toplevel)), ruler_bits, ruler_width, ruler_height); XtSetArg(args[0], XmNiconPixmap, icon_pixmap); XtSetValues(toplevel, args, 1); +----------------------+---+ Jan Newmarch, Information Science and Engineering, University of Canberra, PO Box 1, Belconnen, Act 2616 Australia. Tel: (Aust) 6-2522422. Fax: (Aust) 6-2522999 ACSnet: jan@ise.canberra.edu.au ARPA: jan%ise.canberra.edu.au@uunet.uu.net UUCP: {uunet,ukc}!munnari!ise.canberra.edu.au!jan JANET: jan%au.edu.canberra.ise@EAN-RELAY +--------------------------+