i am trying to make a gui control.
but my button is not respondig on corresponding event.
i am new in lite c and first time with gui cintrols.
i have made this code after reading PANEL chapter from manual.i have also tried to EVENT chapter. may be i need to read more.
i have tried.but failed to figure out where is the problem in my code.

it will be helpful if someone point out me to those required chapter related to panel event
and
where is my mistake in this code and what to write to activate those button.

here is my code:

#include <default.c>
#include <stdio.h>

enable_mouse = 1;

function func_on()
{printf("func_on");}


function func_off()
{printf("func_off");}

function Click()
{printf("button has been Clickcked");}

function Leave()
{printf("button has been leaved");}

function Over()
{printf("mouse is Over this button ");}

PANEL* pan =
{
size_x = 800;
size_y = 600;

bmap = BG.pcx;//image size is 800*600

//all images used in button is 200*100

button(350,200,SG.pcx,SG.pcx,SG.pcx,func_on,func_off,Over);
button_radio(350,265,SG.pcx,OP.pcx,QG.pcx,Click,Leave,Over);
button_toggle(350,320,SG.pcx,OP.pcx,SG.pcx,QG.pcx,Click,Leave,Over);

flags = SHOW;
}


function main()
{

screen_color.red =255;
screen_size.x = 1000;
screen_size.y = 800;
video_screen=1;

}



keep moving forward