Little bug in TWBrowse

Post Reply
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Little bug in TWBrowse

Post by Enrico Maria Giordano »

In the function wBrwLine() there are

hOld = SelectObject( hBrush )

and

SelectObject( hOld )

while they should be

hOld = SelectObject( hDC, hBrush )

and

SelectObject( hDC, hOld )

EMG
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Enrico,

Could you explain what that bug is causing or not causing?

James
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

It's hard to say. The wrong handle is passed to SelectObject() API. At least the brush is just not activated. At worst we have a resource leak or similar unpleasant effects.

EMG
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Enrico,

Fixed. Thanks,
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply