Missing transp. SAY on Img. in Dialogs ( FWH 9.06 ) ?

Re: Missing transp. SAY on Img. in Dialogs ( FWH 9.06 ) ?

Postby Enrico Maria Giordano » Tue Jul 14, 2009 9: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
User avatar
Enrico Maria Giordano
 
Posts: 8570
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Missing transp. SAY on Img. in Dialogs ( FWH 9.06 ) ?

Postby James Bott » 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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Missing transp. SAY on Img. in Dialogs ( FWH 9.06 ) ?

Postby Enrico Maria Giordano » Wed Jul 15, 2009 9:37 am

James Bott wrote:Enrico, it is good to see you back.


I never left this forum. :-)

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

Re: Missing transp. SAY on Img. in Dialogs ( FWH 9.06 ) ?

Postby Antonio Linares » Wed Jul 15, 2009 3: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41902
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Missing transp. SAY on Img. in Dialogs ( FWH 9.06 ) ?

Postby Enrico Maria Giordano » Wed Jul 15, 2009 5: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
User avatar
Enrico Maria Giordano
 
Posts: 8570
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 24 guests