home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 16 / CD_ASCQ_16_0994.iso / news / 4611 / fw16d.ins / SAMPLES / TESTBMP.PRG < prev    next >
Text File  |  1994-04-11  |  2KB  |  82 lines

  1. //----------------------------------------------------------------------------//
  2. //  FiveWin 1.0 - Ejemplos
  3. //  (c) A.Linares, F.Pulpón 1993
  4. //
  5. // Construir con BUILD TestBmp
  6. //
  7. //----------------------------------------------------------------------------//
  8.  
  9. // Prototipos de Bases de datos gráficas con FiveWin
  10.  
  11. // Las imágenes están almacenadas dentro de la DLL Fishes.dll
  12. // Necesitas un editor de recursos - Te recomendamos el Resource WorkShop
  13. // de Borland. No esperes más y comprátelo ya !!!
  14.  
  15. // Contacta con Borland para conseguirlo.
  16.  
  17. #include "FiveWin.ch"
  18.  
  19. static oWnd
  20.  
  21. //----------------------------------------------------------------------------//
  22.  
  23. function Main()
  24.  
  25.    SET RESOURCES TO "Fishes.dll"
  26.  
  27.    DEFINE WINDOW oWnd FROM 1, 1 TO 22, 75 ;
  28.       TITLE "Bitmap Test" MENU BuildMenu()
  29.       
  30.    SET MESSAGE OF oWnd TO OemToAnsi( "FiveWin 1.0 - Base de Datos de 'Pescaitos'" )
  31.  
  32.    ACTIVATE WINDOW oWnd
  33.    
  34.    SET RESOURCES TO
  35.    
  36. return   
  37.  
  38. //----------------------------------------------------------------------------//
  39.  
  40. function BuildMenu()
  41.  
  42.    MENU
  43.       MENUITEM "Dialog Box"
  44.       MENU
  45.          MENUITEM "&Activate..." CHECKED ACTION DlgFish() ;
  46.             MESSAGE OemToAnsi( "Activar la Caja de Diálogo con Imágenes" )
  47.          SEPARATOR
  48.          MENUITEM "&Terminar"    ACTION oWnd:End() ;
  49.             MESSAGE "Eso es todo... Seguro que ya tienes algunas buenas ideas!"
  50.       ENDMENU
  51.  
  52.       MENUITEM "&Another" DISABLED
  53.    ENDMENU
  54.    
  55. return
  56.  
  57. //----------------------------------------------------------------------------//
  58.  
  59. function DlgFish()
  60.  
  61.    local oDlg
  62.    local n := 1
  63.    local bmpFish
  64.  
  65.    DEFINE DIALOG oDlg NAME "Fish"
  66.    
  67.    REDEFINE BITMAP bmpFish ID 110 OF oDlg NAME "Fish1"
  68.  
  69.    REDEFINE BUTTON ID 120 OF oDlg ;
  70.       ACTION If( n > 1, bmpFish:SetBMP( "Fish" + AllTrim( Str( --n ) ) ), ;
  71.                         Tone( 956, 2 ) )
  72.    
  73.    REDEFINE BUTTON ID 130 OF oDlg ;
  74.       ACTION If( n < 6, bmpFish:SetBMP( "Fish" + AllTrim( Str( ++n ) ) ), ;
  75.                         Tone( 956, 2 ) )
  76.  
  77.    ACTIVATE DIALOG oDlg CENTERED
  78.    
  79. return
  80.  
  81. //----------------------------------------------------------------------------//
  82.