Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!news.cs.indiana.edu!news.nd.edu!mentor.cc.purdue.edu!noose.ecn.purdue.edu!monkey.ecn.purdue.edu!alien From: alien@monkey.ecn.purdue.edu (Yin Chan) Newsgroups: comp.windows.x Subject: New colormaps Message-ID: <1991Mar18.040237.13119@noose.ecn.purdue.edu> Date: 18 Mar 91 04:02:37 GMT Sender: root@noose.ecn.purdue.edu (ECN System Management) Organization: Purdue University Engineering Computer Network Lines: 35 Hi, Two weeks ago I posted a question about installing a new colormap. Thanks for the help I got. The problem is partly solved but I am still puzzled. Now I can change the colormap to the one I create only under the "dxwm" we got along with a DEC5000. But my program does not work under "twm". Could anyone come to help? I am including the part of my prog for sake of investigation. Thanks a lot! Yin /******* Colormap def_colormap, MyColorMaps[MAXCMAPS]; /* set colormap for drawing */ XtSetArg (args[0], XtNcolormap, cmap); XtSetValues(widget, args, 1); /* Install the new colormap */ XInstallColormap (display, cmap); window = XtWindow(widget); XSetWindowColormap (display, window, cmap); XGetWindowAttributes(display, window, &winAttributes); winAttributes.colormap = cmap; XChangeWindowAttributes (display, window, CWColormap, &winAttributes); gc = XCreateGC(display, window, None, (XGCValues *)NULL); XtSetWMColormapWindows(widget, &widget, 1); *********/