[5.0.5] Hidden Display Window
NSMarkop

Hopefully this is the right section to post this in.

I've recently started trying to work with Allegro and after a few hours of troubleshooting setting it up in various IDEs, I settled on Code::Blocks (with MinGW as a compiler). So, I've written a program that just creates a display and displays text, but when it is executed the display is "hidden," with me unable to see/access it.

Here is a picture:

http://img839.imageshack.us/img839/4690/hiddendisplay.png

I am mousing over the farthest icon to the right on my taskbar, the executable of my code, but when I try to bring it to the front it is nowhere to be found. I can see from the small thumbnail that it is working correctly. I feel like the command window shouldn't be open like that though, correct?

Here is my code:

http://pastebin.com/WdLHwgYH

Not sure if this is a bug or just something I am perhaps doing wrong. I would assume there is fix since this is a pretty simple program and people can't have created whole games without overcoming this. Please let me know if you need any specific information.

Thanks in advance.

Trent Gamblin

You can get rid of the console by adding -mwindows to link options. The window is created offscreen somewhere. Perhaps where there is or was another monitor. I don't remember the shortcut key but there's one to move a window. Press that and then use the cursor keys and see if you can find it and move it on screen. Can you tell us about your video card and monitor setup and if you're using OpenGL or Direct3D?

Matthew Leverton

This is a known problem; perhaps it's fixed in 5.1. You can use al_set_window_position() to work around this.

The sequence to move the window would be: ALT+Space followed by M, and then move the mouse.

#include  <allegro5\allegro.h>
#include  <allegro5\allegro_font.h>
#include  <allegro5\allegro_ttf.h>

You should always use forward slashes for paths for the sake of being cross platform.

NSMarkop

I do indeed have multiple monitors, which seems to have been part of the problem. By right clicking the thumbnail and selecting move then using my arrow keys, I was able to get the program window on one of my screens. I hadn't really thought of that being a problem, thanks Trent. I tried adding -mwindows in Project > Build Options > Linker Settings, but it didn't do anything.

For informational purposes, I am using a laptop (HP dv6t) with an external monitor attached and an ATI Radeon HD 6770M as my video card. As far as OpenGL vs. Direct3D, not sure what you mean by that since I am not using either to my knowledge.

al_set_window_position () worked wonderfully, thank you for that Matthew and for pointing out my path mistake (I actually do most schoolwork on Linux so being cross platform is important).

Thread #609581. Printed from Allegro.cc