FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Missing transp. SAY on Img. in Dialogs ( FWH 9.06 ) ?
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Missing transp. SAY on Img. in Dialogs ( FWH 9.06 ) ?
Posted: Tue Jul 14, 2009 09:49 AM
Antonio Linares wrote:DEFINE WINDOW oWnd BRUSH oBrush // oBrush counter is 2


This is not normal and expected behavior. Giving the owner of a GDI object to a control should not create a new GDI object instance. Doing so you seem to really make a copy of the GDI object and assign that copy to the control. Why?

EMG
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Missing transp. SAY on Img. in Dialogs ( FWH 9.06 ) ?
Posted: Wed Jul 15, 2009 12:14 AM
Giving the owner of a GDI object to a control should not create a new GDI object instance. Doing so you seem to really make a copy of the GDI object and assign that copy to the control.


Antonio, I agree with Enrico, this does seem to be redundant.

Enrico, it is good to see you back.

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Missing transp. SAY on Img. in Dialogs ( FWH 9.06 ) ?
Posted: Wed Jul 15, 2009 09:37 AM
James Bott wrote:Enrico, it is good to see you back.


I never left this forum. :-)

EMG
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Missing transp. SAY on Img. in Dialogs ( FWH 9.06 ) ?
Posted: Wed Jul 15, 2009 03:18 PM

Enrico, James,

The GDI object is not created again. Thats the purpose of the counter: to reuse the same GDI objet and thus reduce GDI consume.

When we assign it, we increase the counter. When we End() it, then we decrease the counter. So the same GDI object is used again and again until the counter reaches zero, then the GDI object is finally released (DeleteObject())

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Missing transp. SAY on Img. in Dialogs ( FWH 9.06 ) ?
Posted: Wed Jul 15, 2009 05:57 PM

Yes, but you are still making a copy of the GDI object, at least from a logical point of view. Why not just assign the already created GDI object to the related data member of the control?

EMG

Continue the discussion