1. RE: Windows console
- Posted by Brian Broker <bkb at cnw.com> Jul 17, 2003
- 589 views
Procedures position() and puts() are for DOS/console. They can come in handy for Windows programming as debugging statements but they won't print anything to your window. A proper example based on your code might look like this: -------------------- include Win32Lib.ew without warning object x x = "Jos" constant SLWindow2 = createEx( Window, "Serge Window", 0, Default, Default, 400, 300, 0, 0 ) procedure ABC(integer self, integer event, sequence parms) setPenPos(SLWindow2,10,10) -- position the text pen in window wPuts(SLWindow2,x) -- Windows version of Eu's puts() proc end procedure -- this line tells Windows when to run the procedure -- in this case, do it whenever the window needs to be repainted setHandler(SLWindow2,w32HPaint,routine_id("ABC")) -- this line launches your program in a maximized window WinMain( SLWindow2,Maximize ) -------------------- You should look at the demo programs included with Win32Lib to get a better idea of how Windows progamming works using the library. -- Brian jondolar wrote: > > > Hi everyone > > After creating a full screen window with IDE, is it possible to write on > > that window instead of on the windows console I tried the folling code > and many variations as to where the statements are positioned. In the > best of case, I see my window with nothing on it. Then after Enter, the > window console with my text. Here is the code: > > include get.e > include Win32Lib.ew > without warning > object x,i > x = "Jos" > > constant SLWindow2 = createEx( Window, "Serge Window", 0, Default, > Default, 400, 300, 0, 0 ) > > procedure ABC() > > WinMain( SLWindow2,Maximize ) > position (10,10) > puts(1,x) > puts (1,"\n") > i = wait_key() > end procedure > > ABC() > > -- code generated by Win32Lib IDE v0.17.0 >
2. RE: Windows console
- Posted by Bernie Ryan <xotron at bluefrognet.net> Jul 17, 2003
- 569 views
How about : wputs(SLWindow2,x) Bernie
3. RE: Windows console
- Posted by jondolar <lavigne.s at videotron.ca> Jul 18, 2003
- 591 views
Thanks to Brian and Bernie. I have a slightly better understanding of how to built and use a window. I'l read more thoroughly the win32lib documentation. However, IDE does shield you a lot about the actual coding (good or bad?) Regards Serge Lavigne