Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!mcgill-vision!bloom-beacon!EXPO.LCS.MIT.EDU!converse From: converse@EXPO.LCS.MIT.EDU (Donna Converse) Newsgroups: comp.windows.x Subject: Re: help with XmCreateDrawingArea() ? Message-ID: <8912192313.AA00362@expo.lcs.mit.edu> Date: 19 Dec 89 23:13:10 GMT References: <8912192251.AA27790@expo.lcs.mit.edu> Sender: daemon@athena.mit.edu (Mr Background) Organization: X Consortium, MIT Laboratory for Computer Science Lines: 21 > i'm trying to port an X Lib application to Motif. > ... > when i try to create the graphics > context with this window id, it comes back with a badDrawable > error. > drawingarea = XmCreateDrawingArea (...); > XtManagechild (drawingarea); > ... Call XtRealizeWidget (see section 2.5 of the Intrinsics) with an argument of your toplevel widget. Windows of widgets are created when a widget is realized, not when a widget is created. Calling XCreateGC with a window ID of 0 (no window) would give the type of error that you describe. > w = XtWindow (drawingarea); > XCreateGC (dpy, w, ...); Donna Converse