Re: Drawing Lines to Window
- Posted by David Alan Gay <moggie at INTERLOG.COM> Aug 13, 2000
- 604 views
Hope this helps. I had the same problem..you had to put the line draw in the onpaint procedure that is triggered -- OpenWindows4 -- A demonstration on how to use David Cuny's Win32LIB to create, open, -- close, and reopen windows. I wrote this to get a better idea on how -- David's excellent Windows GUI wrapper works. -- This program will be used to create a very simple text editor. The -- program will allow the loading and saving of text. without warning -- gets rid of all those annoying messages after completion include win32lib.ew -- Main Window (at position 10,10, width = 400, height = 400) constant MainWindow = create(Window,"Project Open Windows, Stage IV", 0, 10, 10, 400, 400, 0) -- What to do if the windows needs to be repainted (note this is where you -- draw a line procedure RepaintMain(integer x1,integer y1,integer x2,integer y2) setPenStyle(MainWindow, Solid) setPenColor(MainWindow, BrightWhite ) drawLine(MainWindow, 10, 10, 390, 390 ) end procedure onPaint[MainWindow] = routine_id("RepaintMain") WinMain(MainWindow, Normal) ----- Original Message ----- From: "bobspringett" <bobspringett at WANADOO.FR> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Sunday, August 13, 2000 8:48 AM Subject: Drawing Lines to Window > I am having trouble drawing lines on a simple window.The literature suggests this can be done without having to resort to using > device contexts. Can anyone tell me please what I'm doing wrong. > Regards > Bob >