Re: Making a window dialog wait for a user response (Win32Lib)

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

ZNorQ wrote:
> 
> Chris Burch wrote:
> > 
> > Hi
> > 
> > Hmmm, that is strange, it behaves as predicted on mine.
> > 
> > 
> > }}}
<eucode>
> > --  code generated by Win32Lib IDE v0.19.1
> > 
> >  
> > include Win32Lib.ew
> > without warning
> > 
> >
> > --------------------------------------------------------------------------------
> > --  Window Window1
> > constant Window1 = createEx( Window, "Window1", 0, Default, Default, 400,
> > 300, 0, 0 )
> > constant PushButton2 = createEx( PushButton, "Open sub", Window1, 56, 176,
> > 88, 28, 0, 0 )
> > constant PushButton3 = createEx( PushButton, "Close", Window1, 180, 176, 88,
> > 28, 0, 0 )
> > ---------------------------------------------------------
> >
> > --------------------------------------------------------------------------------
> > --  Window Window2
> > constant Window2 = createEx( Window, "Window 2", 0, Default, Default, 285,
> > 196, 0, 0 )
> > constant PushButton5 = createEx( PushButton, "Click me", Window2, 84, 76,
> > 88, 28, 0, 0 )
> > ---------------------------------------------------------
> >
> > --------------------------------------------------------------------------------
> > procedure PushButton2_onClick (integer self, integer event, sequence
> > params)--params is ()
> > 	openDialog(Window2)
> > end procedure
> > setHandler( PushButton2, w32HClick, routine_id("PushButton2_onClick"))
> >
> > --------------------------------------------------------------------------------
> > procedure PushButton3_onClick (integer self, integer event, sequence
> > params)--params is ()
> > 	abort(0)
> > end procedure
> > setHandler( PushButton3, w32HClick, routine_id("PushButton3_onClick"))
> >
> > --------------------------------------------------------------------------------
> > procedure PushButton5_onClick (integer self, integer event, sequence
> > params)--params is ()
> > 	closeWindow(Window2)
> > end procedure
> > setHandler( PushButton5, w32HClick, routine_id("PushButton5_onClick"))
> > 
> > 
> > WinMain( Window1,Normal )
> > 
> > </eucode>
{{{

> > 
> > You cant close Window1 until you close Window2
> > 
> > Chris
> > 
> > 
> > <a
> > href="http://members.aol.com/chriscrylex/euphoria.htm">http://members.aol.com/chriscrylex/euphoria.htm</a>
> > <a href="http://uboard.proboards32.com/">http://uboard.proboards32.com/</a>
> > <a
> > href="http://members.aol.com/chriscrylex/EUSQLite/eusql.html">http://members.aol.com/chriscrylex/EUSQLite/eusql.html</a>
> 
> Your example worked perfectly, Chris. Strange that my original
> code didn't work in the same manner.. Guess I'll have to try to
> dig into the code and see what the heck I'm doing wrong here...
> 
> Thanks anyway Chris.
> 
> Kenneth

Just noticed something. The thing is that the code does some integrity
checks in some sequences before using WinMain command. And if there is
an error in this checkroutine, it display my custom dialog - which means
that the openDialog comes before the WinMain does.. Could this be the 
problem?

Kenneth

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

Search



Quick Links

User menu

Not signed in.

Misc Menu