RPGDXThe center of Indie-RPG gaming
Not logged in. [log in] [register]
 
 
Post new topic Reply to topic  
View previous topic - View next topic  
Author Message
Mousie_kebabs
Pretty, Pretty Fairy Princess


Joined: 11 Aug 2005
Posts: 12

PostPosted: Fri Aug 12, 2005 11:26 pm    Post subject: Dev-Cpp - Allegro: Windowed Application [quote]

Hey,

Today I decided I would try out Dev-Cpp and Allegro instead of DJGPP.

I know with Dev-Cpp you can make windowed programs... the code I have written doesn't seem to work.

Code:

#include <allegro.h>

#define WIDTH 1024
#define HEIGHT 768

void main()
{
     allegro_init();
     install_keyboard();
     set_color_depth(16);
     set_window_title("Hello!");    set_gfx_mode(GFX_AUTODETECT_WINDOWED,WIDTH,HEIGHT,0,0);
}
END_OF_MAIN();


That set_gfx_mode() is on the line below and is indented, I just couldn't get it to on here :-/

This program makes a program appear in the Windows bar at the bottom, the taskbar? When I click on the program in the taskbar I see it minimize from the top left hand corner of the screen, and thats all it does... there is no window. Does anyone know why?

Thanks,
Mousie.
Back to top  
Terry
Spectral Form


Joined: 16 Jun 2002
Posts: 798
Location: Dublin, Ireland

PostPosted: Fri Aug 12, 2005 11:43 pm    Post subject: [quote]

I don't know what size of a screen resolution you're having, but I think you'll have have trouble setting a windowed mode when the resolution is the same size as or bigger than the screen. Try testing with a smaller window than screen size (unless you're already doing that).

Also, do you maybe need to pause the program in some way? (e.g. something like this: while(!key[KEY_ESC]); )
_________________
http://www.distractionware.com
Back to top  
Mousie_kebabs
Pretty, Pretty Fairy Princess


Joined: 11 Aug 2005
Posts: 12

PostPosted: Fri Aug 12, 2005 11:47 pm    Post subject: [quote]

Thanks. That worked :)

I am still having trouble with this compiler, never used it before... somtimes it just doesn't let me compile :-/
Back to top  
Terry
Spectral Form


Joined: 16 Jun 2002
Posts: 798
Location: Dublin, Ireland

PostPosted: Sat Aug 13, 2005 12:28 am    Post subject: [quote]

Oh, I've had that error - pretty weird, isn't it? It hasn't happened in a while though, it just comes and goes.

It's a fantastic tool though.
_________________
http://www.distractionware.com
Back to top  
DeveloperX
202192397


Joined: 04 May 2003
Posts: 1626
Location: Decatur, IL, USA

PostPosted: Sat Aug 13, 2005 6:49 am    Post subject: [quote]

mousie_kebabs wrote:
Thanks. That worked :)

I am still having trouble with this compiler, never used it before... somtimes it just doesn't let me compile :-/


If you have any questions, contact me.
_________________
Principal Software Architect
Rambling Indie Games, LLC

See my professional portfolio
Back to top  
Post new topic Reply to topic Page 1 of 1 All times are GMT
 



Display posts from previous:   
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum