Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!sdd.hp.com!hplabs!hpcc05!hpcuhb!hpcilzb!bazavan From: bazavan@hpcilzb.HP.COM (Valentin Bazavan) Newsgroups: comp.windows.x.motif Subject: Re: XmNLabelString Message-ID: <17100005@hpcilzb.HP.COM> Date: 4 Dec 90 15:12:44 GMT References: <12057@hacgate.UUCP> Organization: HP Design Tech Center - Santa Clara, CA Lines: 30 Should be XmString label (not XmString *label, and not char *label): XmString label; . XtSetArg(args[0], XmlabelString, &label); XtGetValues(w, args, 1); If you want to retrieve the text part of "label," you have to do a little more work. For instance, if "label" was created by XmStringCreateLtoR with the default character set (XmSTRING_DEFAULT_CHARSET), then char *s; XmStringGetLtoR(label, XmSTRING_DEFAULT_CHARSET, &s); will set "s" to point to the text part of "label." You can use now "s" like any regular null terminated string. E.g.: char ss[100]; strcpy(ss, s); or printf("%s\n", s); etc. Valentin Bazavan vbazavan@hpdtc.hp.com