Re: A nice window vs Win console
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Jul 26, 2003
- 459 views
On Sat, 26 Jul 2003 00:20:32 +0000, jondolar <lavigne.s at videotron.ca> wrote: > > >As far as I understand, all output produced by Euphoria code that I=20 >write goes to the Windows console...unless I code myself a window with=20 >IDE for example and incorporate that code in my program and use special=20 >procedures with things like SetPenPos, wPuts etc. to output my stuff on=20 >a decent looking screen. Whatever that might look like. > This should be handled internally by euphoria=20 >with a different parameter.=20 >With puts(4,x) for example, the 4 would=20 >indicate that I want my output to a simple full screen window. message_box(text,title,MB_OK) is about the closest you'll get. > >What do you think of that Robert Craig Rob didn't write the windows API > >>From a frustrated newbie who likes Euphoria =20 You have a steep learning curve to look forward to A proper windows program needs an event loop, for a start. The following program is about the simplest mock up of what you seem to want. Someone might post a better example, but this is about as simple as I can make it. Pete -- not useful, for one-off demonstration only: without warning include win32lib.ew with trace constant main=3Dcreate(Window,"Output",0,0,0,1000,750,0), text=3Dcreate(MleText,"",main,5,5,990,710,ES_READONLY) procedure write(sequence message) insertText(text,message&"\r\n") setIndex(text,length(getText(text))+1) end procedure =09 procedure onActivate(integer self, integer event, sequence message) for i=3D1 to 100 do write(sprintf("%d",i)) doEvents(0) if remainder(i,10)=3D0 then sleep(1) end if end for write("done") end procedure setHandler(main,w32HActivate,routine_id("onActivate")) WinMain(main,Normal)