FW does not liberate all controls

FW does not liberate all controls

Postby ukservice » Wed Feb 02, 2011 2: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)


Also, tabs are not released.


Any clue?.

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

Postby Daniel Garcia-Gil » Wed Feb 02, 2011 3:23 pm

Hello

Please, post a sample to show the problem

Thanks
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: FW does not liberate all controls

Postby ukservice » Wed Feb 02, 2011 3:55 pm

Sure. Thank you.

Code: Select all  Expand view

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

Re: FW does not liberate all controls

Postby Daniel Garcia-Gil » Thu Feb 03, 2011 1:08 am

Hello

open msgbar.prg

locate and delete (in PaintBar)
Code: Select all  Expand view
static hBmp


locate
Code: Select all  Expand view
static aInitInfo := { 0, 0 }

write after
Code: Select all  Expand view
static hBmp


Add in METHOD Detroy()
Code: Select all  Expand view
DeleteObject( hBmp )
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: FW does not liberate all controls

Postby nageswaragunupudi » Thu Feb 03, 2011 4: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: Select all  Expand view
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
nageswaragunupudi
 
Posts: 10295
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FW does not liberate all controls

Postby Daniel Garcia-Gil » Thu Feb 03, 2011 9:54 am

Mr. Rao

Thanks so much, i forgot this detail
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: FW does not liberate all controls

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

Re: FW does not liberate all controls

Postby ukservice » Sat Feb 05, 2011 9: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
User avatar
ukservice
 
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: FW does not liberate all controls

Postby nageswaragunupudi » Sun Feb 06, 2011 7: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
User avatar
nageswaragunupudi
 
Posts: 10295
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FW does not liberate all controls

Postby Silvio » Fri Feb 11, 2011 4:16 pm

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

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: FW does not liberate all controls

Postby nageswaragunupudi » Fri Feb 11, 2011 4:46 pm

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

Done.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10295
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 30 guests