Subversion Repositories Kolibri OS

Rev

Rev 7428 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6684 leency 1
/*
2
 * Template C-- program.
3
*/
4
 
7434 leency 5
#define MEMSIZE 4096*10
6684 leency 6
 
7434 leency 7
#include "../lib/io.h"
8
#include "../lib/gui.h"
6684 leency 9
 
10
proc_info Form;
11
 
12
void main()
13
{
7434 leency 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
	}
6684 leency 31
}
32
 
7434 leency 33
void draw_window()
34
{
35
	DefineAndDrawWindow(215, 100, 350, 300, 0x34, 0xEEEeee, "Window title",0);
36
	GetProcessInfo(#Form, SelfInfo);
37
}