Re: Drawing Lines to Window

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

Dan,
First of all thanks for the info.
Secondly 'device contexts' are 'thingies' you need to draw graphics and text to
the screen and the printer. (see Petzold's book on
Windows Programming.
ie hdc=getDC(hWnd), then you are able to Draw to the sceen with the API
functions of GDI32.
It seems that David Cuny has made this transparent to the user. It's probably in
the onPaint() FNCTION.
Regards
Bob
----- Original Message -----
From: Dan B Moyer <DANMOYER at PRODIGY.NET>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Sunday, August 13, 2000 3:52 PM
Subject: Re: Drawing Lines to Window


> Bob,
>
> I don't know what you mean by "device contexts", but the following works:
>
> <code follows>
>
> --  demonstrates drawing a line in a window:
>
> include Win32Lib.ew
> without warning
>
> constant MainWin = create(Window,"a line",0,0,0,400,400,0)
>
> -----------------------------------------------------------
> procedure MakeAline(integer x1, integer y1, integer x2, integer y2)
>    drawLine(MainWin, 10,10,300,300)
> end procedure
> ------------------------------------------------
> onPaint[MainWin] = routine_id("MakeAline")
> ---------------------------------------------
> WinMain( MainWin, Normal )
> ----------------------------------------------------------------------------
> -
>
> <code ends>
>
> ----- Original Message -----
> From: "bobspringett" <bobspringett at WANADOO.FR>
> To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
> Sent: Sunday, August 13, 2000 5: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

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

Search



Quick Links

User menu

Not signed in.

Misc Menu