FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Aplicaci贸n se "congela"
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Aplicaci贸n se "congela"
Posted: Mon Jul 11, 2016 01:44 PM
Code (fw): Select all Collapse
#include "FiveWin.ch"
#include "Ribbon.ch"

function Main()

   local oDlg, oPopup, oBtn

   DEFINE DIALOG oDlg RESOURCE "Test"

   REDEFINE RBBTN oBtn ID 100 OF oDlg POPUP ;
      MENU BuildPopup() ROUND ACTION MsgInfo( "click" ) ;
      PROMPT "Class TRBtn" BITMAP "..\bitmaps\16x16\fivetech.bmp" LEFT

   ACTIVATE DIALOG oDlg CENTERED

   FreeResources()

   SysRefresh()

   DbCloseAll()

   RELEASE All

   Hb_GCAll( .T. )

   CLEAR MEMORY

   CheckRes()

   PostQuitMessage( 0 )

   __QUIT()


return nil

function BuildPopup()

   local oPopup
   
   MENU oPopup POPUP 2007
      MENUITEM "One" ACTION MsgInfo( "One" ) FILE "..\bitmaps\16x16\fivetech.bmp"
      MENUITEM "Two" ACTION MsgInfo( "Two" ) FILE "..\bitmaps\16x16\fivetech.bmp"
      SEPARATOR
      MENUITEM "Three" ACTION MsgInfo( "Three" ) FILE "..\bitmaps\16x16\fivetech.bmp"
   ENDMENU
   
return oPopup


Jo茫o Santos - S茫o Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Aplicaci贸n se "congela"
Posted: Mon Jul 11, 2016 04:25 PM

Si, eso est谩 inclu铆do en versiones posteriores a la que indicas

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Aplicaci贸n se "congela"
Posted: Mon Jul 11, 2016 05:33 PM
Angel,

Asi tambien deber铆a funcionar bien:
Code (fw): Select all Collapse
METHOD Destroy() CLASS TRBtn

   DeleteObject( ::hArrow )
   
   if ::hBack != ::oWnd:hBack
      DeleteObject( ::hBack )
   endif
   
   DeleteObject( ::hRgn )

   ::FreeBitmaps()
   if ::oPopup != nil
      ::oPopup:End()
   endif
   
   Super:Destroy()

return 0
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 728
Joined: Fri Oct 07, 2005 07:38 AM
Re: Aplicaci贸n se "congela"
Posted: Mon Jul 11, 2016 06:48 PM
Antonio Linares wrote:Angel,

Asi tambien deber铆a funcionar bien:
Code (fw): Select all Collapse
METHOD Destroy() CLASS TRBtn

聽 聽DeleteObject( ::hArrow )
聽 聽
聽 聽if ::hBack != ::oWnd:hBack
聽 聽 聽 DeleteObject( ::hBack )
聽 聽endif
聽 聽
聽 聽DeleteObject( ::hRgn )

聽 聽::FreeBitmaps()
聽 聽if ::oPopup != nil
聽 聽 聽 ::oPopup:End()
聽 聽endif
聽 聽
聽 聽Super:Destroy()

return 0


En efecto, as铆 tambi茅n libera correctamente los recursos.
Angel Salom
Visionwin Software - https://www.visionwin.com
------------------------------------------------------------
fwh 19.05 - harbour 3.2 - bcc 7.4

Continue the discussion