Newsgroups: comp.os.msdos.djgpp From: manni DOT heumann AT gmx DOT de (Manni Heumann) Subject: Re: My program's a machine killer! References: <2d1m4.294$oU2 DOT 94919 AT tw12 DOT nn DOT bcandid DOT com> X-Newsreader: News Xpress 2.01 Date: Thu, 03 Feb 2000 08:14:59 GMT NNTP-Posting-Host: dhcp33-226.uni-bielefeld.de Message-ID: <38993907$1@news.uni-bielefeld.de> X-Trace: 3 Feb 2000 09:15:03 +0200, dhcp33-226.uni-bielefeld.de Lines: 32 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com In article <2d1m4.294$oU2 DOT 94919 AT tw12 DOT nn DOT bcandid DOT com>, "Brian" 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