Path: utzoo!attcan!uunet!seismo!sundc!pitstop!male!sun-barr!rutgers!att!homxb!hound!smikes From: smikes@hound.UUCP (S.MIKES) Newsgroups: comp.windows.x Subject: Bitmap Image/XPutImage Question Keywords: How to create/move icons in a window created from bitmaps Message-ID: <3033@hound.UUCP> Date: 27 Apr 89 22:12:45 GMT Organization: AT&T Bell Laboratories, Holmdel Lines: 36 Well, here I am again, asking another silly question! My objective is to place icons in a window and be able to manipulate them (i.e. move, add, delete, re-color, etc.) My current thinking on this is that the icons themselves will be created using the bitmap client. What I am in the dark about is how to get the bitmap file's contents to appear in my specific window, and then be able to subsequently move it around. (Each icon must also be sensitive so that an appropriate callback can be invoked.) When the window is resized, the icons should stay in place and not be scaled to fit into the new size. The following code fragment illustrates the basics of what I am attempting in order to create and display an image from a bitmap (#included earlier): XImage *image; image=XCreateImage( dpy, visual, 1, XYBitmap, 0, (char *)the_bitmapbits, width, height, 8, (width/8) ); XPutImage( dpy, mywin, gc, image, 0,0, 50,50, width, height ); XMapWindow( dpy, mywin ); This doesn't work, needless to say; although I thought it should. Could anyone give me a clue what I need to do to get this to work? (Please be specific.) Secondly, once I get an image on screen, is it possible to make the image sensitive without making it a widget; and if so, how would I go about moving it in the same fashion as the uwm window manager moves windows? I am really looking for short cuts to develop this capability quickly, any help would be greatly appreciated. Thanks in advance, Steve {...}hound!smikes (201)949-7737 "It's good to be the King!" -- Mel Brooks