Advertisement
idsystems

CPP_RAD_Ejercicio08

May 17th, 2012
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.62 KB | None | 0 0
  1. /* ej08_Apagado
  2. Ejemplo que muestra algunas funciones del sistema
  3. desde C++ */
  4. #include <radc++.h>
  5.  
  6. Form form1("Reset/ShutDown/LogOff - RAD C++ Ejemplo");
  7. Button btnL("Log Off",  AUTO_ID,35 ,100,100,30,form1);
  8. Button btnS("Shut Down",AUTO_ID,145,100,100,30,form1);
  9. Button btnR("Restart",  AUTO_ID,255,100,100,30,form1);
  10.  
  11.  
  12.            
  13. FormProcedure form1Proc(FormProcArgs) {
  14.  
  15.     ON_CLOSE() Application.close();
  16.    
  17.     ON_COMMAND_BY(btnL) System.logOff();
  18.  
  19.     ON_COMMAND_BY(btnS) System.shutDown();
  20.  
  21.     ON_COMMAND_BY(btnR) System.restart();
  22.    
  23.  
  24.     return 0;
  25. }
  26.  
  27.  
  28.  
  29. rad_main()
  30.  
  31.         form1.procedure = form1Proc;
  32.    
  33. rad_end()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement