FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Bug in TBar?
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM

Re: Bug in TBar?

Posted: Mon Aug 15, 2011 01:29 PM

Maybe is connected to this viewtopic.php?f=6&t=22142 ?

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Bug in TBar?

Posted: Sun Sep 25, 2011 02:13 PM

Update: I'm getting this problem under my XP too. I just compile and run my application and immediately see the vanishing bitmaps. So I don't think it's a resource leak problem.

EMG

Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM

Re: Bug in TBar?

Posted: Sun Sep 25, 2011 02:47 PM

Yes. I confirm it.

What's wrong?.

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM

Re: Bug in TBar?

Posted: Sun Sep 25, 2011 04:16 PM
Hello,

I always use a Buttonbar on Dialog-INIT and never had a Problem.
( You can Test it from inside my new Debugging-tool )

Code (fw): Select all Collapse
...
...
ACTIVATE DIALOG oDlgMain ;
ON INIT ( oDlgMain:Move( 120 , 70, 900, 265, .f. ), DLG_BAR() )

RETURN( NIL )

// ------- BUTTONBAR MAIN - DIALOG ----------------
// ---------------------------------------------------------------

FUNCTION DLG_BAR()
LOCAL oBar, oBtn1, oBtn2, oBtn3, oBtn4, oBtn5, oBtn6, oBtn7, oBtn8, oBtn9

DEFINE BUTTONBAR oBar OF oDlgMain2 SIZE 100, 55 3DLOOK 2007 TOP
...
...


Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM

Re: Bug in TBar?

Posted: Sun Sep 25, 2011 06:29 PM

Uwe,

Try to compile and start many times your app. You will see vanishing bitmaps

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM

Re: Bug in TBar?

Posted: Sat Oct 01, 2011 12:40 PM

Hi,

Any update?

Thanks.

FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM

Re: Bug in TBar?

Posted: Wed Oct 05, 2011 02:14 PM

I even use xHarbour recently (last svn version) and never experience this error, I recently changed to harbor for testing the latest version (svn) and I are two occasions where the bitmap disappear. :-)

Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM

Re: Bug in TBar?

Posted: Wed Oct 05, 2011 02:59 PM

Carlos,

Thank you for your feedback.

Where you able to track it?.

FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM

Re: Bug in TBar?

Posted: Wed Oct 05, 2011 06:52 PM

tried to duplicate the error, but has not been shown again, but again with xHarbour never happened.

Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Bug in TBar?

Posted: Wed Oct 05, 2011 08:32 PM

I'm using xHarbour and saw the problem as well.

EMG

Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM

Re: Bug in TBar?

Posted: Thu Oct 06, 2011 06:52 AM

Sometimes I Have this problem with BUTTONBAR .

Maurizio

www.nipeservice.com

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Bug in TBar?

Posted: Thu Oct 06, 2011 08:42 AM

TBar and BUTTONBAR are the same class (TBar). TBar is the class, BUTTONBAR is a command that creates an instance of TBar.

EMG

Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM

Re: Bug in TBar?

Posted: Thu Oct 06, 2011 09:29 AM

Antonio,

Any clue?.

This is very important !!!.

Thank you.

FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM

Re: Bug in TBar?

Posted: Fri Oct 07, 2011 09:11 AM

Antonio,

Can you please look at this?.

Thank you very much.

FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Bug in TBar?

Posted: Fri Oct 07, 2011 10:19 AM

I have never seen this problem myself, anyhow I think that we have two things to check:

  1. Check the bitmap handle before painting it to see if it still is a valid GDI object. There is a function IsGdiObject() that we can use

  2. Painting a bitmap involves the creation of new DCs (hDC) that eventually could fail on low memory conditions, this is very difficult to happen, but we could check it.

Finally the way to go is to create a log file and check every single step taken when a bitmap is going to be painted. I am going to show how to create and implement such log file. Then. For those of you where it is failing, you will just have to review the log file and we will get a clear idea of what is happening :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com