Jump to content
  • Advertisement
Sign in to follow this  
darenking

Allegro, can I open a window without a bar at the top?

This topic is 4724 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My terminology is appalling or non-existent as usual! You know the bar at the top of a window in Windows? With the icon and program name to the left, and to the right three boxes, one to minimize, one to restore and one to close. Well, my game opens one of these (ie a Windows window) at the start to ask you to choose a screen mode (then the game is played fullscreen). Trouble is, the window has the three boxes top right, and yet all three are disabled, which is rather ugly. I would like to get them to work, or better still, remove them, or even remove the whole bar, that may be best. The user can press Esc to exit, so the X isn't even required. Any hints? *shrug*

Share this post


Link to post
Share on other sites
Advertisement
The only way to completely remove the bar would be to use Windows specific DX calls to create the window yourself and then attach Allegro to it. This is not recommended because it breaks support for cross platform.

I would recommend just enabling the [X] button if it bothers you.

set_close_button_callback()


int quit = 0;
// called when the X button is clicked
void user_wants_out(void)
{
quit = 1
}

// ...
set_close_button_callback(user_wants_out);
// ...

// will quit on ESC or X button
while (!quit)
{
if (key[KEY_ESC]) quit = 1;
}




(If you are using Allegro 4.0.X, then the function is named something else. See the "Using Allegro" chapter of the manual.)

Share this post


Link to post
Share on other sites
Btw, if you wanted to have such behaviour in SDL, it would be just a matter of passing one more SDL_NOFRAME parameter to SDL_SetVideoMode() function.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!