Re: win32lib: manipulating vWinMainState

new topic     » goto parent     » topic index » view thread      » older message » newer message

Alexander Toresson wrote:
> 
[snip]
> It receives events because you call WinMain(). What I meant is that the
> tracer should run even when WinMain() is never called, by polling 
> doEvents().

Thanks, now I see what you are trying to do. Fortunately, its easily done.

In your 'included' file, when you want the application to stop running,
call ...

  quitWindow(Screen)

And start the main program running by using ...

  WinMain(0, 0)

For example..

<---tracer.ew--->
 constant TraceWin = create(Window, "Tracer", 0, 0, 0, 300, 300,0)
 openWindow(TraceWin, Normal)
 procedure traceClose(integer self, integer event, sequence parms)
     quitWindow(Screen)
 end procedure    
 setHandler(TraceWin, w32HClose, routine_id("traceClose"))
<---end of file---> 

<---test.exw--->
without warning
include win32lib.ew
include other.ew
WinMain(0, 0)    
<---end of file--->

-- 
Derek Parnell
Melbourne, Australia

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu