If you aren't using a compositing window type, it can get weird. To get around problems with graphics and controls, I've placed things such that they are drawn only over white, etc, or otherwise, create 'fake' ones, using PICT graphics and track mouseclicks in rectangles. Perhaps you'd benefit from the MFResume check...as _WndRefresh is not always sent upon a resume. evnt = DIALOG(0) id = DIALOG(evnt) SELECT evnt Case _Mfevent Select case id Case _MfClipboard Case _MfResume // Refresh Here? End Select End Select rc On Jul 17, 2008, at 3:45 PM, Walter Lenk wrote: > Greetings - > > I am working on a program that has a few sequential windows, all > with several controls (a mix of buttons and edit fields) that are > drawn over a full-screen graphic. When I make the window. I either > make the controls first and draw the graphics over them, or I draw > the controls over the graphics. Either way, right after the window > is created the runtime redraws the controls so that they are on > top, and all is OK. > > The problem occurs when the app is 'Hidden' via the Apple menu, and > then reactivated by clicking the programs icon in the dock. When > this happens, my function that is called by ON DIALOG can respond > to a _wndRefresh event and redraw the graphics, but the controls > have already been drawn and are now obscured. I tried using ON > EVENT for the same purpose, but only the Edit Fields (and not the > buttons) are subsequently redrawn by the runtime. > > After studying some examples in 'Rntm Appearance.Incl', I came up > with the following function that I can call after drawing the > graphics to restore the controls: > > LOCAL FN b_Draw_Window_Controls(WindwNum&) > ' code abstracted from 'runtime Window( wArg as long )' in 'Rntm > Appearance.Incl' > DIM @ port as CGrafPtr > DIM @ outWnd as WindowRef > DIM@ Wndw& as long > LET Wndw& = WindwNum& ' FBgetCurWndInfo needs a > register variable > FN FBgetCurWndInfo( port, outWnd, Wndw& ) > FN DrawAllControlsFB( outWnd ) ' from 'fn FBWindowUpdate' > in 'Rntm Appearance.Incl' > END FN > > This seems to work, so I would appreciate if someone with more > savvy than I have would look it over and tell me if I have done > anything horribly wrong. Also, any guesses about it's FBtoC > translation? > > Thanks, > > Walter > -- > > =========================================== > Walter Lenk Cambridge Ma 617-547-7781 > =========================================== > > -- > To unsubscribe, send ANY message to: futurebasic- > unsubscribe@... >