Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!metro!ee.su.oz.au!andrew From: andrew@ee.su.oz.au (Andrew Ho) Newsgroups: comp.windows.x Subject: Standard Colormap Message-ID: <1991Jan15.030705.22252@metro.ucc.su.OZ.AU> Date: 15 Jan 91 03:07:05 GMT Sender: news@metro.ucc.su.OZ.AU Reply-To: andrew@ee.su.oz.au (Andrew Ho) Organization: Electrical Engineering, The University of Sydney, Australia Lines: 50 Nntp-Posting-Host: 129.78.13.35 Hi, I am writing an image processing progm which requires using a standard colormap. However, it seems to me that the standard colormap cannot be created. The following is my sample codes. Can anyone help me to find out what's wrong ? Thanks for any pointers. andrew@ee.su.oz.au /****************************************************/ #include #include #include #include #include #include Widget top; Widget form; XStandardColormap std_colormap; main(argc, argv) int argc; char **argv; { Arg wargs[3]; int j; top=XtInitialize(argv[0], "top", NULL, 0, &argc, argv); j=0; XtSetArg(wargs[j], XtNwidth, 50); j++; XtSetArg(wargs[j], XtNheight, 50); j++; form= XtCreateManagedWidget("form", XwformWidgetClass, top, wargs, j); XtRealizeWidget(top); if (XGetStandardColormap(XtDisplay(top), RootWindow(XtDisplay(top), DefaultScreen(XtDisplay(top))), &std_colormap, XA_RGB_DEFAULT_MAP) == 0) { printf("Cannot create std colormap\n"); } XtMainLoop(); }