FW does not liberate all controls

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

FW does not liberate all controls

Post 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.
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
User avatar
Daniel Garcia-Gil
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita
Contact:

Re: FW does not liberate all controls

Post by Daniel Garcia-Gil »

Hello

Please, post a sample to show the problem

Thanks
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
User avatar
ukservice
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: FW does not liberate all controls

Post 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
// -------------------------------------------------------------------------
 
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
User avatar
Daniel Garcia-Gil
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita
Contact:

Re: FW does not liberate all controls

Post 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 )
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: FW does not liberate all controls

Post 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.
Regards

G. N. Rao.
Hyderabad, India
User avatar
Daniel Garcia-Gil
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita
Contact:

Re: FW does not liberate all controls

Post by Daniel Garcia-Gil »

Mr. Rao

Thanks so much, i forgot this detail
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
User avatar
ukservice
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: FW does not liberate all controls

Post by ukservice »

Thank you very much.

What about Tabs?.

best regards,
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: FW does not liberate all controls

Post 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.
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: FW does not liberate all controls

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

G. N. Rao.
Hyderabad, India
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: FW does not liberate all controls

Post by Silvio »

I hope Antonio correct all this on new fwh release...
Best Regards, Saludos

Falconi Silvio
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: FW does not liberate all controls

Post by nageswaragunupudi »

Silvio wrote:I hope Antonio correct all this on new fwh release...

Done.
Regards

G. N. Rao.
Hyderabad, India
Post Reply