Aplicación se "congela"

Re: Aplicación se "congela"

Postby karinha » Mon Jul 11, 2016 1:44 pm

Code: Select all  Expand view

#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
karinha
 
Posts: 7453
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Aplicación se "congela"

Postby cnavarro » Mon Jul 11, 2016 4: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
User avatar
cnavarro
 
Posts: 6515
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Aplicación se "congela"

Postby Antonio Linares » Mon Jul 11, 2016 5:33 pm

Angel,

Asi tambien debería funcionar bien:
Code: Select all  Expand view
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
Antonio Linares
Site Admin
 
Posts: 41476
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Aplicación se "congela"

Postby AngelSalom » Mon Jul 11, 2016 6:48 pm

Antonio Linares wrote:Angel,

Asi tambien debería funcionar bien:
Code: Select all  Expand view
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
User avatar
AngelSalom
 
Posts: 708
Joined: Fri Oct 07, 2005 7:38 am
Location: Benicarló (Castellón ) - España

Previous

Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 46 guests