Advertisement
idsystems

CPP_RAD_Ejercicio07

May 17th, 2012
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.66 KB | None | 0 0
  1. /* ej07_EventosForma
  2. Ejemplo para usar los eventos que contiene una forma
  3. usando RadC++ */
  4. #include <radc++.h>
  5.  
  6. //create new form
  7. Form Form1("Eventos Forma - RAD C++ Ejemplo");
  8.  
  9. //create new procedure for form, procedure1 is procedure name
  10. FormProcedure procedure1 (FormProcArgs) {
  11.  
  12.     //capture event ON_CLOSE which is fired when form is closed, [X] is clicked
  13.     ON_CLOSE() {
  14.         //show simple message box
  15.         Form1.msgBox("Estoy saliendo");
  16.         //exit application
  17.         Application.close();
  18.     }
  19.    
  20.     //always return 0
  21.     return 0;  
  22. }
  23.  
  24. //rad c++ main program
  25. rad_main()
  26.  
  27.     //attach the created procedure with form
  28.     Form1.procedure = procedure1;
  29.  
  30. rad_end()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement