[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

534.0. "Iconified bitmap icon" by RABBET::FARRELL (Money, there is no substitute!) Tue Apr 04 1989 14:09

Hello,

Could someone please tell me specifically what I have to do to get my own
icon in the icon box (and at the left of the selection bar on the window)?
(The little square you press to turn your window into an icon).

i.e. What kind of file the image must be in?  What parameter to change of the
     upper (top) level widget.  

note: I am using UIL/UID and a C program.

advTHANKSance

		$$$$ ted $$$$

T.RTitleUserPersonal
Name
DateLines
534.1Here's how we do it. IAGO::SCHOELLERWho's on first?Tue Apr 04 1989 16:1941
what I do,

Use decw$examples:bitmap to create a 32x32 and a 17x17 bitmap for your icons.
$bitmap=="$decw$examples:bitmap"
$bitmap icon.bit 32x32
$bitmap sm_icon.bit 17x17

In your C file include the following:

#include "icon.bit"
#include "sm_icon.bit"

    Widget	toplevel_widget;
    Display     *disp;
    Screen      *scrn;
    Drawable    drwbl;
    Pixmap      ipix;
    Pixmap      spix;
    Arg         al[40];
    int         count;

    toplevel_widget = XtInitialize (...
    disp = XtDisplay (toplevel_widget);
    scrn = XtScreen (toplevel_widget);
    drwbl = RootWindowOfScreen (scrn);
    ipix = XCreateBitmapFromData
	(disp, drwbl, icon_bits, icon_width, icon_height);
    spix = XCreateBitmapFromData
	(disp, drwbl, sm_icon_bits, sm_icon_width, sm_icon_height);

    count = 0;
    XtSetArg (al[count], XtNiconPixmap, ipix); count++;
    XtSetArg (al[count], XtNiconifyPixmap, spix); count++;
    XtSetValues (toplevel_widget, al, count);


You can also do a large part of it with UIL but someone else can fill you in on
that.

Dick