Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6883487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:23:22+00:00 2026-05-27T05:23:22+00:00

I am creating a windows application in C++. I am using SDL ( http://www.libsdl.org/

  • 0

I am creating a windows application in C++. I am using SDL (http://www.libsdl.org/) – however this question applies to many other types of windows applications written in C++ as I have had the same problem before in MFC years ago and never solved this issue.

Now I want my application to start up maximized. Many other applications startup by default in the maximized state, for example when I run firefox, it automatically starts up maximized.

Now I read that I can use ShowWindow
http://msdn.microsoft.com/en-us/library/ms633548

By calling:

ShowWindow(info1.window, SW_MAXIMIZE);

The window then maximized when this is called as if the user clicked on the maximized button. However, the problem is that when my application starts, firstly it starts up in a particular size (700 by 500 just for example) then when the ShowWindow gets called, it then maximizes.
This is a big difference between how Firefox starts up, Firefox starts up and just appears maximized without appearing at a small size first.

So my question is, how to start up maximized without this intermediate window size (which is not maximized) before the ShowWindow is called? It is annoying for the user to see a smaller window which then maximizes suddenly upon startup.


If you can tell me how to do it in MFC or DOT NET, I can probably work out how to do it in SDL, I guess.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:23:23+00:00Added an answer on May 27, 2026 at 5:23 am

    Call the SystemParametersInfo Windows API function with SPI_GETWORKAREA to get the width and height of the screen without the the taskbar, and set your window size when calling CreateWindow to these values. (You could also call GetSystemMetrics with SM_CXSCREEN and SM_CYSCREEN to get the width and the full height of the screen, but in this case the bottom edge of your window would be hidden by the taskbar.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a windows application using VB.Net and this application will take a
I'm creating a Windows Mobile 6 application using MFC Single Document Interface with CFormView
I'm creating a database application using ASP.NET and I want to make a Windows
We are creating sample application for windows mobile using Rijndael algorithm. Its working fine.
I'm creating a Windows video capture application and am using DirectShow for capture. As
I'm creating an application using Expressjs running on node under IISNode (i.e on windows).
I'm creating a Windows Form application using C#. The form contains a ListView. It's
Creating My Windows Form Application and using ADO.Net as Data Access layer and SQL
I am working on creating a Windows Forms Application in C++ using Visual Studio
I am creating a Windows Forms Application using Visual Studio 2010. I populate data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.