Aplicación se "congela"

User avatar
karinha
Posts: 7963
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Been thanked: 5 times
Contact:

Re: Aplicación se "congela"

Post by karinha »

Code: Select all | Expand


#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
User avatar
cnavarro
Posts: 6572
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Has thanked: 4 times
Been thanked: 6 times

Re: Aplicación se "congela"

Post by cnavarro »

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
User avatar
Antonio Linares
Site Admin
Posts: 42662
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 69 times
Been thanked: 96 times
Contact:

Re: Aplicación se "congela"

Post by Antonio Linares »

Angel,

Asi tambien debería funcionar bien:

Code: Select all | Expand

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
User avatar
AngelSalom
Posts: 727
Joined: Fri Oct 07, 2005 7:38 am
Location: Benicarló (Castellón ) - España
Has thanked: 1 time
Contact:

Re: Aplicación se "congela"

Post by AngelSalom »

Antonio Linares wrote:Angel,

Asi tambien debería funcionar bien:

Code: Select all | Expand

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