RE: Disallowing moving a window (>JUDITH)
- Posted by Judith <camping at txcyber.com> Jul 22, 2001
- 378 views
Hi, Martin, I was disappointed to find that on my Windows98 SE with Win32lib.ew version 55.1 that the ghosting still persists using your program. What system are you using? Judith martin.stachon at worldonline.cz wrote: > Hello, > this example shows how to disallow moving a window > (better method then setting postion back with each move, > which causes flickering and appearing 'ghost' window - the method IDE > uses) > I have written it for Judith, but I think this can be useful also for > others. > > <CODE :> > > include win32lib.ew > > constant > WM_WINDOWPOSCHANGING = #0046 > > constant > flags = 4+4+4+4+4+4 > -- six members in the WINDOWPOS struct > -- before flags > > constant mainWindow create (Window, "Test", 0, 100, 100, 100, 100, 0) > -- testing window > > procedure onEvent_mainWindow(atom event, atom wParam, atom lParam) > -- lParam is pointer to WINDOWPOS structure > atom cur_flags > if event = WM_WINDOWPOSCHANGING then -- Windows tell us they are about > to move a window > cur_flags = peek4u(lParam + flags) -- give the current flags (UInt) > poke4(lParam+flags,or_bits(SWP_NOMOVE,cur_flags)) -- combine the current > flags with > end if --SWP_NOMOVE, which disallows moving > end procedure > onEvent[mainWindow] = routine_id("onEvent_mainWindow") > -- register for as much windows as you want > > WinMain(mainWindow, Normal) > > > > </CODE> > > ___ > Regards, > Martin Stachon > martin.stachon at worldonline.cz > http://www.webpark.cz/stachon > >