|
Oops..Hit the wrong button.
Here is the code...
----------------
toplevel = XtInitialize("FOO(Version 1.0)","Cclass",NULL,0,&argc,argv);
main_window = DwtMainWindow(toplevel,"Testing",100,100,400,200);
XtManageChild(main_window);
--------------
The icon and title bar both show "FOO(Version 1.0)". I want the icon to
only have the name "FOO".
I tried XSetIconName after getting the display and window, but I got the
following run time error message:
X error event received from server: not a valid window ID
Failed request major op code 18 X_ChangeProperty
Failed request minor op code 0 (if applicable)
ResourceID 0x400006 in failed request (if applicable)
Serial number of failed request 26
Current serial number in output stream 37
%XLIB-E-ERROREVENT, error event received from server
%TRACE-E-TRACEBACK, symbolic stack dump follows..........
Any suggestions?
|
| Re invalid window id error ... you probably either used the
widget pointer instead of the window id, or you accessed the
window id before there was a window (i.e. before realizing
the widget).
I'm sure there is a toolkit routine to set/change the icon
name, or at least something to use XtSetValues on.
Dan
|
|
Re: .0
Try
{
Arg arg[4];
int nargs;
nargs = 0;
XtSetArg(arg[argc], XtNtitle, "Title"); argc++;
XtSetArg(arg[argc], XtNiconName, "Icon Name"); argc++;
XtSetValues(toplevel, arg, argc);
}
Jatin
|