So how is it done?

I've tried this only to get a messagebox stating that I don't have Direct X 8. Maybe someone could post a simple sample. Also, I'm using the Borland 5.5 compiler.

I've taken the sample posted by Justin_W and tried modifying it.

Code:
#include <allegro.h>

int main() 
{ 
 // Initialize Allegro.        
 allegro_init();


 // Set the resolution to 640 by 480 with SAFE autodetection.
 set_gfx_mode(GFX_GDI, 640, 480, 0, 0);


 // Installing the keyboard handler.
 install_keyboard();

 // Printing text to the screen.
 textout(screen, font, "Hello World!", 1, 1, 10);
 textout(screen, font, "Press ESCape to quit.", 1, 12, 11);

 // Looping until the ESCape key is pressed.
 while(! key[KEY_ESC])
   poll_keyboard(); // This shouldn't be necessary in Windows. 

 // Exit program.

 allegro_exit();
 return 0;     
}     

// Some Allegro magic to deal with WinMain().
END_OF_MAIN();