Bug in TBar?

User avatar
lucasdebeltran
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am
Contact:

Re: Bug in TBar?

Post by lucasdebeltran »

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.
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Bug in TBar?

Post by Enrico Maria Giordano »

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
User avatar
lucasdebeltran
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am
Contact:

Re: Bug in TBar?

Post by lucasdebeltran »

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.
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: Bug in TBar?

Post by ukoenig »

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: Select all

...
...
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 :lol:
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.
User avatar
lucasdebeltran
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am
Contact:

Re: Bug in TBar?

Post by lucasdebeltran »

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.
User avatar
ukservice
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: Bug in TBar?

Post by ukservice »

Hi,

Any update?

Thanks.
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
User avatar
carlos vargas
Posts: 1421
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: Bug in TBar?

Post by carlos vargas »

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)
User avatar
ukservice
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: Bug in TBar?

Post by ukservice »

Carlos,

Thank you for your feedback.

Where you able to track it?.
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
User avatar
carlos vargas
Posts: 1421
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: Bug in TBar?

Post by carlos vargas »

tried to duplicate the error, but has not been shown again, but again with xHarbour never happened.
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
Maurizio
Posts: 705
Joined: Mon Oct 10, 2005 1:29 pm
Contact:

Re: Bug in TBar?

Post by Maurizio »

Sometimes I Have this problem with BUTTONBAR .

Maurizio
www.nipeservice.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Bug in TBar?

Post by Enrico Maria Giordano »

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

EMG
User avatar
ukservice
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: Bug in TBar?

Post by ukservice »

Antonio,

Any clue?.

This is very important !!!.

Thank you.
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
User avatar
ukservice
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: Bug in TBar?

Post by ukservice »

Antonio,

Can you please look at this?.

Thank you very much.
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Bug in TBar?

Post by Antonio Linares »

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
Post Reply