Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!thumper!ulysses!andante!princeton!udel!mmdf From: iphwk%MTSUNIX1.BITNET@cunyvm.cuny.edu (Bill Kinnersley) Newsgroups: comp.sys.amiga Subject: Double Buffering and the Menu Strip Message-ID: <4148@louie.udel.EDU> Date: 20 Sep 88 14:54:58 GMT Sender: mmdf@udel.EDU Lines: 45 I'm attempting to write a program that needs to use both menus and double buffered animation. That is, there will be well-defined periods of menu selection interspersed with periods of double buffering. The problem is that I keep losing the menu. Here is (schematically) how I open things: bm[0] = AllocMem(); bm[1] = AllocMem(); ns.Flags = CUSTOMSCREEN | CUSTOMBITMAP; ns.CustomBitMap = bm[0]; s = OpenScreen(&ns); vp = &s->ViewPort; nw.Screen = s; w = OpenWindow(&nw); rp = w->RPort; SetMenuStrip(w,&menu[0]); and here is how I double buffer: vp->RasInfo->BitMap = bm[tog]; WaitTOF(); ScrollVPort(vp); tog ^= 1; rp->BitMap = bm[tog]; It looks like the menu wants to remain attached to the original bitmap bm[0]. When bm[0] is being displayed, the menu works OK. When bm[1] is being displayed, pressing the right mouse button has no apparent effect. The thing I tried was to put in a ClearMenuStrip() and SetMenuStrip() each time the double buffering was finished, but this didn't help. Is there something else I should be toggling (in the Layer_Info perhaps?) to keep the menu system informed which bitmap is the current one? -- Bill Kinnersley Physics Department BITNET: iphwk@mtsunix1 Montana State University INTERNET: iphwk%mtsunix1.bitnet@cunyvm.cuny.edu Bozeman, MT 59717 CSNET: iphwk%mtsunix1.bitnet@relay.cs.net (406)994-3614 UUCP: ...ucbvax!mtsunix1.bitnet!iphwk "This message was packed as full as practicable by modern electronic equipment. Some settling of contents may have occurred during transmission."