Subversion Repositories Kolibri OS

Rev

Rev 6746 | Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /*
  2.  * Template C-- program.
  3. */
  4.  
  5. #define MEMSIZE 4096*10
  6.  
  7. #include <io.h>
  8. #include <gui.h>
  9.  
  10. proc_info Form;
  11.  
  12. void main()
  13. {
  14.         word btn;
  15.         loop() switch(WaitEvent())
  16.         {
  17.                 case evButton:
  18.                         btn = GetButtonID();              
  19.                         if (btn == 1) ExitProcess();
  20.                         break;
  21.          
  22.                 case evKey:
  23.                         GetKeys();
  24.                         if (key_scancode == SCAN_CODE_ESC) ExitProcess();
  25.                         break;
  26.                  
  27.                 case evReDraw:
  28.                         draw_window();
  29.                         break;
  30.         }
  31. }
  32.  
  33. void draw_window()
  34. {
  35.         DefineAndDrawWindow(215, 100, 350, 300, 0x34, 0xEEEeee, "Window title",0);
  36.         GetProcessInfo(#Form, SelfInfo);
  37. }
  38.