Page 1 of 1

FW does not liberate all controls

Posted: Wed Feb 02, 2011 2:47 pm
by ukservice
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)


Also, tabs are not released.


Any clue?.

Thank you.

Re: FW does not liberate all controls

Posted: Wed Feb 02, 2011 3:23 pm
by Daniel Garcia-Gil
Hello

Please, post a sample to show the problem

Thanks

Re: FW does not liberate all controls

Posted: Wed Feb 02, 2011 3:55 pm
by ukservice
Sure. Thank you.

Code: Select all | Expand


#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
// -------------------------------------------------------------------------
 

Re: FW does not liberate all controls

Posted: Thu Feb 03, 2011 1:08 am
by Daniel Garcia-Gil
Hello

open msgbar.prg

locate and delete (in PaintBar)

Code: Select all | Expand

static hBmp


locate

Code: Select all | Expand

static aInitInfo := { 0, 0 }

write after

Code: Select all | Expand

static hBmp


Add in METHOD Detroy()

Code: Select all | Expand

DeleteObject( hBmp )

Re: FW does not liberate all controls

Posted: Thu Feb 03, 2011 4:20 am
by nageswaragunupudi
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: Select all | Expand

hBmp := nil

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

Re: FW does not liberate all controls

Posted: Thu Feb 03, 2011 9:54 am
by Daniel Garcia-Gil
Mr. Rao

Thanks so much, i forgot this detail

Re: FW does not liberate all controls

Posted: Thu Feb 03, 2011 11:25 am
by ukservice
Thank you very much.

What about Tabs?.

best regards,

Re: FW does not liberate all controls

Posted: Sat Feb 05, 2011 9:33 pm
by ukservice
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.

Re: FW does not liberate all controls

Posted: Sun Feb 06, 2011 7:20 am
by nageswaragunupudi
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

Re: FW does not liberate all controls

Posted: Fri Feb 11, 2011 4:16 pm
by Silvio
I hope Antonio correct all this on new fwh release...

Re: FW does not liberate all controls

Posted: Fri Feb 11, 2011 4:46 pm
by nageswaragunupudi
Silvio wrote:I hope Antonio correct all this on new fwh release...

Done.