1. RE: [Win32lib] setPenColor
- Posted by Derek Parnell <Derek.Parnell at SYD.RABOBANK.COM> Jun 17, 2002
- 431 views
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C2164A.5C2BA3B0 charset=iso-8859-1 I didn't respond yesterday because I didn't have enough FACTS to say. I started with your excellent clues on the trail to tracking down this problem. I will continue today, if I get enough breaks. Please be patient. I know that win32lib was originally written with the idea that drawing routines would ONLY be used inside a Paint event or to a Screen control. Later, when Pixmaps were added to the library, the resource handling was adjusted to cater for these but it still is not perfect. There needs to be a full overhaul of the resource tracking subsystem to both simplify it and to make it work under all conditions. However, my first goal is just to try and get it working for now. ------------- Derek. > -----Original Message----- > From: Wolf [mailto:wolfritz at KING.IGS.NET] > Sent: Tuesday, 18 June 2002 2:28 > To: EUforum > Subject: Re: [Win32lib] setPenColor > > > > Since no one responded to my last blurb about this, I put a > printf() behind every call to xSelectObject() in win32lib, > then ran the following code in both an onOpen[], then an > onPaint[], with conflicting results. > In an onOpen[], there were 8 calls to xSelectObject(), as I > expected, but in an onPaint[], there were only 5 ( per > 'paint' event ). > If the 'rule' regarding SelectObject() is to be taken > literally, should the results not be the same ??? > > < An application should always replace a new object with the > original, default object after it has finished drawing with > the new object. > > > This is clearly happening in an onOpen[], so why not an onPaint[] ? > Perhaps someone could enlighten me ... > > -- simple code -- > setPenColor(w,Red) > drawLine(w,10,10,120,120) > setPenColor(w,Green) > drawLine(w,10,10,40,140) > setPenColor(w,Blue) > drawLine(w,10,10,140,10) > setPenColor(w,Black) > drawLine(w,10,10,60,100) > > > > ================================================================== De informatie opgenomen in dit bericht kan vertrouwelijk zijn en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onterecht ontvangt wordt u verzocht de inhoud niet te gebruiken en de afzender direct te informeren door het bericht te retourneren. ================================================================== The information contained in this message may be confidential and is intended to be exclusively for the addressee. Should you receive this message unintentionally, please do not use the contents herein and notify the sender immediately by return e-mail. ================================================================== ------_=_NextPart_000_01C2164A.5C2BA3B0 Content-Type: application/ms-tnef