FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FW does not liberate all controls
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
FW does not liberate all controls
Posted: Wed Feb 02, 2011 02:47 PM
Hello,

With SetResdebug and Checkres() I have discovered that there are always two controls which are not liberated:

    02-02-2011 15:44:35: BMP,-1744497987,TWINDOW:HANDLEEVENT(0)->_FWH(3394)->SHOWWINDOW(0)->TWINDOW:ACTIVATE(961)->MAIN(265)

    02-02-2011 15:44:35: BMP,-1526394227,TMSGBAR:PAINT(428)->TMSGBAR:HANDLEEVENT(0)->_FWH(3394)->UPDATEWINDOW(0)->TWINDOW:ACTIVATE(962)->MAIN(265)[/list:u]

    Also, tabs are not released.


    Any clue?.

    Thank you.
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: FW does not liberate all controls
Posted: Wed Feb 02, 2011 03:23 PM

Hello

Please, post a sample to show the problem

Thanks

Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
Re: FW does not liberate all controls
Posted: Wed Feb 02, 2011 03:55 PM
Sure. Thank you.

Code (fw): Select all Collapse
#include "FiveWin.ch"
#include "ribbon.ch"
#include "Splitter.ch"
#include "URLLink.ch"

//--------------------------------------------------------------------------//






// -------------------------------------------------------------------------
FUNCTION MAIN()

   LOCAL oIcon, oTmr, oTmr2
   LOCAL oOutLook2003, oSplit
   LOCAL oOVMenu1, oOVMenu2, oOVMenu3, oOVMenu4, oOVMenu5

   LOCAL oRBar                                                    // Ribbon
   LOCAL oGr, oGr1, oGr2, oGr3, oGr4, oGr5, oGr6, oGr7, oGr8
   LOCAL oBtn,   oBtn1,  oBtn2,  oBtn3,  oBtn4, oBtn5
   LOCAL oBtn6,  oBtn7,  oBtn8,  oBtn9,  oBtn10
   LOCAL oBtn11, oBtn12, oBtn13, oBtn14, oBtn15
   LOCAL oBtn16, oBtn17, oBtn18, oBtn19, oBtn20
   LOCAL oBtn21, oBtn22, oBtn23, oBtn24, oBtn25
   LOCAL oBtn26, oBtn27, oBtn28, oBtn29, oBtn30
   LOCAL oBtn31, oBtn32, oBtn33, oBtn34, oBtn35

   LOCAL oBarMain
   LOCAL cMainMsg    := "Invoice System"







   // Debug
   SetResDebug( .T. )






   // Driver CDX----------------------------------------------------------------
   REQUEST DBFCDX, DBFFPT

   RDDSETDEFAULT( "DBFCDX")
   // -------------------------------------------------------------------------




   // Balloon shape required for tooltips
   SetBalloon( .T. )
   // -------------------------------------------------------------------------








   SetGetColorFocus()               
   SET DATE FORMAT TO "dd-mm-yyyy"  
   SET DELETED ON                   
   SetCancel( .F. )                 
   SetHandleCount( 130 )            
   
   





   



   DEFINE ICON oIcon RESOURCE "INVOICE"


   DEFINE WINDOW oWndMain FROM 1, 1 TO 28, 75 COLOR CLR_WHITE, CLR_GRAY ;    //COLOR 7,8421440 ;
          TITLE "Invoice System" ;
          MENU MenuMain() ;
          ICON oIcon


    //Ribbon
    DEFINE RIBBONBAR oRBar WINDOW oWndMain PROMPT "Options";
         HEIGHT 130 TOPMARGIN 25



    ADD GROUP oGr1 RIBBON oRBar TO OPTION 1 PROMPT "Config" width 105

     @ 15, 20 ADD BUTTON oBtn1 GROUP oGr1 BITMAP "RCONFIG" ;
              ROUND  SIZE 68,60   PROMPT "Config" ACTION Nil
              

    




   // Timer 
   DEFINE TIMER oTmr INTERVAL 300000 ACTION Superpro( oWndMain ) OF oWndMain  
   




   SET MESSAGE OF oWndMain ;
       TO ( cMainMsg ) ;
       CLOCK ;
       DATE ;
       KEYBOARD 2007





   IF FILE( (".\SUPERPRO.DLL" ) ) ; ACTIVATE TIMER oTmr ; ENDIF  
  
   oWndMain:oMsgBar:lInfoRes:=.F.   
   oWndMain:Center()

   ACTIVATE WINDOW oWndMain MAXIMIZED




   // End
   oRBar:End()

   DbCloseAll()
   ResAllFree()      
   CheckRes()

   QUIT



RETURN NIL
// -------------------------------------------------------------------------
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: FW does not liberate all controls
Posted: Thu Feb 03, 2011 01:08 AM
Hello

open msgbar.prg

locate and delete (in PaintBar)
Code (fw): Select all Collapse
static hBmp


locate
Code (fw): Select all Collapse
static aInitInfo := { 0, 0 }

write after
Code (fw): Select all Collapse
static hBmp


Add in METHOD Detroy()
Code (fw): Select all Collapse
DeleteObject( hBmp )
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FW does not liberate all controls
Posted: Thu Feb 03, 2011 04:20 AM
Add in METHOD Detroy()
Code:
DeleteObject( hBmp )


This creates problem when multiple windows having msgbar are opened and one of them are closed.
Adding this line after DeleteObject( hBmp )
Code (fw): Select all Collapse
hBmp := nil

This enables other windows re-initializing hBmp when painting and finally when all windows are closed, hBmp is destroyed.
Regards



G. N. Rao.

Hyderabad, India
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: FW does not liberate all controls
Posted: Thu Feb 03, 2011 09:54 AM

Mr. Rao

Thanks so much, i forgot this detail

Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
Re: FW does not liberate all controls
Posted: Thu Feb 03, 2011 11:25 AM

Thank you very much.

What about Tabs?.

best regards,

FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
Re: FW does not liberate all controls
Posted: Sat Feb 05, 2011 09:33 PM

02/05/11 21:31:59: FONT,-703984536,TTABS:NEW(176)->MAIN(21)

02/05/11 21:31:59: FONT,-1106640424,TTABS:NEW(177)->MAIN(21)

They are not released!!!.

Why then closing a DIALOG FW does it internally?.

Thank you.

FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FW does not liberate all controls
Posted: Sun Feb 06, 2011 07:20 AM
02/05/11 21:31:59: FONT,-703984536,TTABS:NEW(176)->MAIN(21)

02/05/11 21:31:59: FONT,-1106640424,TTABS:NEW(177)->MAIN(21)

They are not released!!!.

You are right. Mr. fgondi also pointed this out in
viewtopic.php?f=6&t=20753&p=110591#p110591
Regards



G. N. Rao.

Hyderabad, India
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: FW does not liberate all controls
Posted: Fri Feb 11, 2011 04:16 PM

I hope Antonio correct all this on new fwh release...

Best Regards, Saludos



Falconi Silvio
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FW does not liberate all controls
Posted: Fri Feb 11, 2011 04:46 PM
Silvio wrote:I hope Antonio correct all this on new fwh release...

Done.
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion