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 3605790
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:10:04+00:00 2026-05-18T21:10:04+00:00

I never knew this, but apparently: By default, the system reduces a minimized window

  • 0

I never knew this, but apparently:

By default, the system reduces a
minimized window to the size of its
taskbar button and moves the minimized
window to the taskbar. A restored
window is a window that has been
returned to its previous size and
position, that is, the size it was
before it was minimized or maximized.

In an application, we want to save the position/size of various windows at exit. This leads to a problem for minimized windows. Our solution is to restore all windows before running the save-state logic, but that just seems hacky. Is there a better way?

  • 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-18T21:10:04+00:00Added an answer on May 18, 2026 at 9:10 pm

    How about using GetWindowPlacement?
    That returns a WINDOWPLACEMENT structure that contains information about the window’s coordinates in the restored position.

    Remember that (as Leo Davidson points out in the comments) that you must respect the difference between workspace and screen coordinates. As the WINDOWPLACEMENT documentation explains:

    The coordinates used in a
    WINDOWPLACEMENT structure should be
    used only by the GetWindowPlacement
    and SetWindowPlacement functions.
    Passing workspace coordinates to
    functions which expect screen
    coordinates (such as SetWindowPos)
    will result in the window appearing in
    the wrong location. For example, if
    the taskbar is at the top of the
    screen, saving window coordinates
    using GetWindowPlacement and restoring
    them using SetWindowPos causes the
    window to appear to “creep” up the
    screen.

    Or, the simpler solution that I’ve no doubt used before is just to check if the window is minimized before saving the state, and if it is, skip saving any state information.

    As far as explaining why a window changes its size when it gets minimized, Raymond Chen’s blog entry (and the linked entry as well) on the subject is mandatory reading. They don’t really change to their taskbar button’s size, but rather to a pre-defined size of 160×31. He explains that you can see this by minimizing a MDI child window into its parent—that’s really its size.

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

Sidebar

Related Questions

If this has been asked before, I apologize but this is kinda of a
I have this ant script which should create the table customer. I see the
I assumed when I have, say Project A and Project B, and Project B
I would like to hear from people who have real world programming experience in
I'll start by saying that over the course of a few projects, I have
I'm building a solution for a client which allows them to create very basic
I have a question describd below: I have UITextView showing following content: Maybe it's
So I have created a piece of software which I wanna package and post
I'm super new to programming and I've been using appengine to help me learn

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.