addition to the FallingBall program increases the difficulty of the game but now i need to make a menu screen to adjust

mouse speed: set_mouse_speed(int x, int y);
set difficulty: BallSpeed = int speed;

want to read from a file of last 10 high score and to display on screen.

want to use mouse control in a check box GUI would be great just dont know what i need to start one and how to start the gui before my program or link the GUI to start the game. Ill also need the GUI to save the values of the game to a file as in config file and then the program to read these values.

Second i dont want any one to do it for me just point me in the correct direction thank you.

FallingBall.h
Code:
#ifndef _FallingBall_H
#define _FallingBall_H
#include "allegro.h"
#define MODE GFX_AUTODETECT_FULLSCREEN
#define WIDTH 640
#define HEIGHT 480
#define BallSpeed 1
#define BallSize 10
#define MouseSpeed 1



struct tagBall {
    int x;
    int y;
    int speed;
    int color;
    int size;
	
}  Balls[10];

struct Floor {
    int y;
} Floors; 
int mouseh;
int buffer = 0;
int n;
int gameover = 0;
int dead[5];
int lives = 10;
int score = 0;
int active_page;
int mousex;
int mousey;
void menuscreen();
void mousehold();
void dropball();
void moveball();
void movefloor();
void expload();
void checkdead();
//void score();
void getinput();
void setupscreen();

#endif
FallingBall.c
Code:
#include <c:\dev-cpp\source\FallingBall.h>

void menuscreen(){
    //init screen for user input data
    
}    
void mousehold(){
    //mousehold data
    set_mouse_range(0 + BallSize-3,0 + BallSize-3,SCREEN_W - BallSize+3,Floors.y - BallSize+3);
    if (mouse_b & 1 && mouseh < 30){
        mouseh++;
        return;
    }    
    if (mouseh >= 30){
        while(mouse_b & 1){
            textprintf(screen,font,SCREEN_W/2 - (4*19),SCREEN_H/2,makecol(255,255,255),"Dont Hold The Mouse");
        }    
    }    
    if(!mouse_b & 1){
        mouseh = 0;
        }    
}    

void moveball(){
    Balls[n].y = Balls[n].y + BallSpeed;//Balls.speed;
    return;
}
void checkdead(){
    if (mouse_x > Balls[n].x - BallSize && mouse_x < Balls[n].x + BallSize){
        if (mouse_y > Balls[n].y - BallSize && mouse_y < Balls[n].y + BallSize){
            if (mouse_b & 1){
                dead[n] = 1;
                score += 10;
            }
        }
    }       
    if (Balls[n].y > Floors.y - BallSize)
    {
        Balls[n].y = 0 + BallSize;
        Balls[n].x = rand() % (SCREEN_W - (BallSize )) + BallSize;
        lives--;
    }    
    if (dead[n] != 0){
        dropball();
        dead[n] = 0;
    }    
}
void expload(){
    //if dead = 1 then expload
}
void movefloor(){
    Floors.y = Floors.y - 5;
    
}    
void dropball(){
    Balls[n].y = 0 + BallSize;
    Balls[n].x = rand() % (SCREEN_W - (BallSize )) + BallSize;
    movefloor();
    return;
}    
void setupscreen()
{
    //set video mode    
    int ret = set_gfx_mode(MODE, WIDTH, HEIGHT, 0, 0);
    if (ret != 0) {
        allegro_message(allegro_error);
        return;
    }
}                    
int main(void)
{
    allegro_init();
    install_mouse();
    install_keyboard();
    install_timer();
    srand(time(NULL));
    set_mouse_speed(2,2);
    setupscreen();
    menuscreen();
    Floors.y = SCREEN_H;
        
    BITMAP *buffer = create_video_bitmap(SCREEN_W,SCREEN_H);
    BITMAP *buffer2 = create_video_bitmap(SCREEN_W,SCREEN_H);
    BITMAP *active_page;
    //callmenu();
    menuscreen();
    dropball();
    active_page = buffer2;
    while(!key[KEY_ESC] && lives != 0){
        //order of events
        clear_to_color(active_page, makecol(0, 0, 0));
        for (n = 0;n < (score/100) + 1;n++){
        
        checkdead();
        moveball();
        circle(active_page,mouse_x,mouse_y,BallSize / 2,makecol(255,0,0));
        circlefill(active_page,Balls[n].x,Balls[n].y,BallSize,makecol(0,0,255));
        moveball();
        mousehold();
        }
        rectfill(active_page,0,Floors.y,SCREEN_W,SCREEN_H,makecol(255,0,0));
        textprintf(active_page,font,0,0,makecol(255,255,255),"Lives: %i Score: %i ",lives,score);
        
        //rest(5);
        show_video_bitmap(active_page);
        if (active_page == buffer)
	       active_page = buffer2;
        else
           active_page = buffer;
           
    }    
    destroy_bitmap(buffer);
    destroy_bitmap(buffer2);
    textprintf(screen,font,0,0,makecol(255,255,255),"Last Score was %i Press ESC to Exit",score);
    while(!key[KEY_ESC]);
    allegro_exit();
}
END_OF_MAIN();
program of FallingBall uses Fast Page Flipping for clean and smooth demo graphics.

also i think there is a memory problem in the program as in doesnt delete all the memory used by the program. can any one help with this issue. Constant restarts to free up memory while i run the program 100's of times to debug. system seems to get clogged.
-CIRCLE