Mail Archives: djgpp/2000/02/03/12:40:49
In article <2d1m4.294$oU2 DOT 94919 AT tw12 DOT nn DOT bcandid DOT com>, "Brian" <none AT noemail DOT com> wrote:
>When I run the short little program below, my PC reboots. I don't have VESA
>so I set my graphics mode to VGA 320x200. I don't know if this is a problem.
>(SciTech wouldn't work with my machine) Can anyone spot the problem on the
>code below? Specifically the clear_to_color() function. I'm just trying to
>load a list box and turn the background color to black. I'm new to graphics
>programming, so if there's an easier way to do this, please tell.
[SNIP]
>int main(int argc)
>{
> int ret;
>
> allegro_init();
> install_keyboard();
> set_gfx_mode(GFX_VGA, 320, 200, 0, 0);
> clear_to_color(screen, 0);
> ret = do_dialog(the_dialog, -1);
>
> readkey();
> return 0;
>}
I'm not really sure if that is your problem (or your only problem), but you
should also call install_mouse() and install_timer(). The dialogs need a mouse
and the mice need timers.
--
Manni
- Raw text -