Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!ucsd!ucbvax!lta.lta.com!david From: david@lta.lta.com (David B. Lewis) Newsgroups: comp.windows.x.motif Subject: (none) Message-ID: <9101091626.AA16528@lta.com> Date: 9 Jan 91 16:26:52 GMT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 26 In article <1991Jan7.193437.20073@mlb.semi.harris.com>, uunet!rutgers.edu!soleil!mlb.semi.harris.com!sloth.mlb.semi.harris.com!pjp (Pat J. Pinchera) writes: |> Does anyone know how to modify the window menu (the default menu associated |> with the 'close' dash button in the upper left corner of most windows)? |> The Programmer's Guide shows how to do this via UIL and default files, |> but I want to modify it via application code (C). The OSF/Motif Application Porting Clinic Track II course from the August 1989 - February 1990 Road Show included an example of this code. It's basically doing this, in pseudo-code with irrelevant arguments omitted: if (XmIsMotifWMRunning) { Atom our_atom = XmInternAtom (_XA_MWM_MESSAGES) XmAddWMProtocols (&our_atom) XtSetArg (arg[0], XmNmwmMenu, "Our_Restart _R AltF2 f.send_msg 3816547290") XtSetValues(toplevelshell) XmAddProtocolCallback(our_atom, 3816547290, Restart) } to set up such an extra item with mnemonics and accelerators and an arbitrary callback tag to be returned. -- David B. Lewis Lewis, Trachtenberg & Associates (LTA) Note new address!: david@lta.com +1 617 225 0366