Where did windows minimize to before the taskbar was invented?

Date:October 28, 2004 / year-entry #378
Tags:history
Orig Link:https://blogs.msdn.microsoft.com/oldnewthing/20041028-00/?p=37453
Comments:    39
Summary:Before Explorer was introduced in Windows 95, the Windows desktop was a very different place. The icons on your desktop did not represent files; rather, when you minimized a program, it turned into an icon on the desktop. To open a minimized program, you had to hunt for its icon, possibly minimizing other programs to get...

Before Explorer was introduced in Windows 95, the Windows desktop was a very different place.

The icons on your desktop did not represent files; rather, when you minimized a program, it turned into an icon on the desktop. To open a minimized program, you had to hunt for its icon, possibly minimizing other programs to get them out of the way, and then double-click it. (You could also Alt+Tab to the program.)

Explorer changed the desktop model so that icons on your desktop represent objects (files, folders) rather than programs. The job of managing programs fell to the new taskbar.

But where did the windows go when you minimized them?

Under the old model, when a window was minimized, it displayed as an icon, the icon had a particular position on the screen, and the program drew the icon in response to paint messages. (Of course, most programs deferred to DefWindowProc which just drew the icon.) In other words, the window never went away; it just changed its appearance.

But with the taskbar, the window really does go away when you minimize it. Its only presence is in the taskbar. The subject of how to handle windows when they were minimized went through several iterations, because it seemed that no matter what we did, some program somewhere didn't like it.

The first try was very simple: When a window was minimized, the Windows 95 window manager set it to hidden. That didn't play well with many applications, which cared about the distinction between minimized (and visible) and hidden (and not visible).

Next, the Windows 95 window manager minimized the window just like the old days, but put the minimized window at coordinates (-32000, -32000), This didn't work because some programs freaked out if they found their coordinates were negative.

So the Windows 95 window manager tried putting minimized windows at coordinates (32000, 32000), This still didn't work because some programs freaked out if they found their coordinates were positive and too large!

Finally the Windows 95 window manager tried coordinates (3000, 3000), This seemed to keep everybody happy. Not negative, not too large, but large enough that it wouldn't show up on the screen (at least not at screen resolutions that were readily available in 1995).

If you have a triple-monitor Windows 98 machine lying around, you can try this: Set the resolution of each monitor to 1024x768 and place them corner-to-corner. At the bottom right corner of the third monitor, you will see all your minimized windows parked out in the boonies.

(Windows NT stuck with the -32000 coordinates and didn't pick up the compatibility fixes for some reason. I guess they figured that by the time Windows NT became popular, all those broken programs would have been fixed. In other words: Let Windows 95 do your dirty work!)

[Raymond is currently on vacation; this message was pre-recorded.]


Comments (39)
  1. David Candy says:

    In 9x if the shell was crashed (so no shell) it acted like 3.1 but with titlebars (or buttons) rather than icons. In XP a crashed shell shows nothing.

  2. mschaef says:

    Windows 3.x icons (and earlier?) could also be owner drawn. That was sometimes a convenient way to display program status when a program didn’t have a full window on the screen. IIRC, clock could display the time in its icon.

  3. Normally a crashed shell in Windows XP will restart itself, if it doesn’t sense that you crashed it on purpose ("taskkill /IM explorer.exe /F" for example).

    Why doesn’t it restart in all scenarios? One scenario is that a shell extension developer wants to attach a debugger to explorer.exe to check what happends during startup, and this is a lot easier then having to do it some other way :). I guess the developers of explorer.exe also uses this feature during development…

    But if I recall correctly then there is some registry key or some other config you can set so that it will never restart. Maybe you’ve accidently turned on that?

  4. Chris Becke says:

    Well, I cant comment about crashing, but editing the shell= in the appropriate location in the registry – to point to progman.exe for example – worked last time i tried it.

    The icons all stack up in the bottom left of the screen as rectangular titlebars. Looks quite gross. I can’t understand why the shell free icon painting wasn’t kept for non explorer shells.

  5. Raymond Chen says:

    Whatever look you pick for minimized apps will be the look for all shells. You can’t have one look if the shell is Explorer and a different look if the shell isn’t because the window manager doesn’t know what the shell is! (Even if it did, it would mean that if you killed Explorer, all the minimized windows would suddenly change their look. Since this never happened before, it’s highly likely that apps wouldn’t handle it well. E.g., information they cached during WM_NCPAINT would no longer be valid. I intend to discuss this further on February 10th, 2005.)

  6. Adrian says:

    Why not use a desktop window that covers the entire screen area, and hide minimized apps by lowering them in the z-order? That seems less likely than any of the other solutions to bother an application.

    I’ve known a few apps that resist being positioned off-screen, and will move themselves back into view automatically.

  7. Tom says:

    quote

    I intend to discuss this further on February 10th, 2005

    /quote

    Wow, talk about planning ahead.

  8. Andy says:

    I miss user drawn icons.

    One of the very first Windows applications I ever wroted was DogCow 3.1 for Windows, one of the best tail-wagging desktop accessories available in 1991.

  9. Raymond Chen says:

    "…lowering them in the z-order"

    that wouldn’t work for minimized topmost windows.

  10. Chris Becke says:

    Well… If the icons drew the windows 3.1 way, they’d be drawing at 3000,3000 using the explorer shell, and no one would ever know. With a legacy shell like progman, they’d draw on the visible screen the old way.

    That would effect MDI type applications. But I can’t say the mini titlebar instead of mini icon-paint is a better way of displaying minimized MDI windows.

  11. David Candy says:

    But what accounts for the 3.1 behaviour in 9x with no shell running and XP which does not show minimised apps at all without the shell running.

    And why February 10th.

    The person talking about shell restarting

    HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogon

    AutoRestartShell=

    In 9x there was a program that monitored the shell and restarted it. If that crashed the shell didn’t restart and if you didn’t have a program open (to exec explorer via File Open dialog) then one had to restart.

  12. Raymond Chen says:

    "Why February 10th" – I have my blog topics planned out months in advance. That one just happens to be planned for February 10th.

    Minimized window positions are calculated at minimize time. if a shell comes/goes, you have to restore and re-minimize to get the position recalculated based on the new conditions.

  13. David Candy says:

    Chris posted while I was typing. Then it should also be drawn at 3000,3000 in 9x if it’s at -32000, -32000 in NT.

    It reminds me of a program that I wrote that simulates Emacs Dabbrev-Expand (in Word) by positioning a Word dialog box offscreen (at 32000, 32000 from memory) with access keys and using that to feed the keystrokes back to word. Focus was always a problem that I solved but don’t remember how.

  14. Mike Dunn says:

    To add to Andreas’s post: You can (nicely) manually kill the shell by going Start->Shut down, holding Ctrl+Alt+Shift and clicking Cancel. You’ll use this all the time if you’re writing and debugging a shell extension on Win 9x.

  15. Sriram says:

    >I have my blog topics planned out months in advance. That one just happens to be planned for February 10th.

    And I usually don’t know what I’m going to get up and do tomorrow :-)

  16. John Topley says:

    Windows NT prior to version 4.0 had a really cool feature whereby if you minimised an AVI that was playing, it would scale the AVI to icon size and it would continue to play within the minimised icon!

  17. I’m anxiously awaiting the day when Raymond’s preblog queue wraps a year. At the rate he’s preblogging it’ll happen fairly soon.

  18. foxyshadis says:

    Will there be a buffer overflow, having thought his queue would never pass several months? ^_~

  19. DavidK says:

    I’d love to see how you’re Swedish will be coming along in 6 months time ;)

  20. Raymond Chen says:

    No I will not publish the blog plans because I frequently reorder articles in the queue to try to get a balance between geek technical articles and history articles. The balance is a bit out of kilter nowadays, so articles will likely get shuffled around to try to compensate. But I’ll try not to move the Feb 10th entry.

  21. Stuart Brockman says:

    Can someone tell me why the feature of double clicking on the desktop when explorer was not running to display the task manager was removed in windows 98? It was very useful for when explorer died and refused to come back…

    And about explorer dying in XP, in my experiance it wont come back if there is another explorer running (ie another user on fast user switching), but at least you can use alt-ctrl-del to display the task manager to bring it back…

  22. Tom says:

    Talking about "inventing the task bar" or "Explorer changing the desktop model" is a bit of a reach. Both styles of interaction were around in several other systems before any version of Windows adopted either of them, as were both styles of file management. For example, MultiFinder put files on the desktop and a list of applications into the menu bar in the late 1980’s, and twm had an "iconbox" (vertical taskbar). And even they probably weren’t the first to do this.

  23. James Risto says:

    Ok, I am venturing out on my limited Windows dev experience. How about act the same as Win3x – tell the app that its window is above the taskbar and let it draw away as usual. Except, instead of 32×32 it has only 16×16, but clip it. DefWindowProc can then draw the mushed 32×32 icon in that 16×16 space.

  24. Robert Morris says:

    Tom:

    I’ve never used it much myself, but I recall that even Windows 2.0 (or some other earlier version) had a list of icons at the bottom of the screen, sort of like a primitive taskbar. Then they took it in Windows 3.0 to make the icons minimize directly to the desktop.

  25. Norman Diamond says:

    10/29/2004 9:31 AM Stuart Brockman

    > And about explorer dying in XP, in my

    > experiance it wont come back if there is

    > another explorer running (ie another user on

    > fast user switching),

    That’s my experience too, even with a single user (i.e. no user switching). I almost always have an Explorer window open with folder view on the left and a folder’s contents on the right. Usually I minimize that window but pop it back up (maximized) when needed.

    > but at least you can use alt-ctrl-del to

    > display the task manager to bring it back…

    Yes, but that doesn’t bring back the task bar. Famous cases from Windows 9x don’t bring back the icons in the notification area. In Windows XP it’s less frequent but more irritating. When a new instance of Explorer doesn’t bring back the Start button and task icons, it’s cumbersome to restore every running application to shut each down gracefully and then shut down the machine for a reboot to get the task bar back.

  26. beuges says:

    Norman, I’m sure someone already told you in a reply to you moaning about this very same issue that the task of bringing back icons to the notification area lies with the program that put them there, not with explorer itself. Do you even read the replies to your trolls?

  27. mschaef says:

    ". Famous cases from Windows 9x don’t bring back the icons in the notification area"

    That can be done in ten lines of code. Tops.

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_int/shell_int_programming/taskbar.asp

    Watch for this message and use it to recreate your icon:

    s_uTaskbarRestart = RegisterWindowMessage(TEXT("TaskbarCreated"));

  28. Norman Diamond says:

    10/31/2004 11:44 PM beuges

    > Norman, I’m sure someone already told you in

    > a reply to you moaning about this very same

    > issue that the task of bringing back icons

    > to the notification area lies with the

    > program that put them there, not with

    > explorer itself.

    Yes. Now tell me which program is responsible for losing the entire task bar including the Start button, the Quick Launch area, and the buttons that correspond to most of the windows that are displayed by ordinary applications. Prior to Windows XP, when Windows Explorer died and was restarted, those parts of the task bar came back.

    11/1/2004 8:59 AM mschaef

    also quotes my phrase that contrasts the behavior of Windows 9x and completely ignores this particular way in which Windows XP is worse.

  29. Raymond Chen says:

    Looks like it’s just a bug if the "open folders in separate process" checkbox is set and there is a secondary Explorer process running. The new copy sees the secondary copy and thinks, "Oh, that guy will take care of the taskbar, I don’t need to."

    It’s just a bug; no need to get all huffy about it.

  30. Norman Diamond says:

    11/1/2004 4:39 PM Raymond Chen

    > It’s just a bug

    Yes, along with lots of others. This one is cumbersome though I think not dangerous to users’ existing data, unless they can’t find a way to shut down gracefully and reboot. And it was added in Windows XP, along with several others. I think we agree.

    > no need to get all huffy about it

    If you reread the huffy reply that I was replying to, perhaps you will think mine was not excessive.

    On the other hand, consider how many years Windows XP has been out and the number of bugs that were added in Windows XP that haven’t been reverted to things that worked in Windows 2000. Is the huffiness really worse than the absence of a bugfix? (Of course this doesn’t mean Windows 2000 fixed all of Windows XP’s bugs, only some. Windows XP fixed some of Windows 2000’s bugs too. Even Windows 98 fixed one: Windows 98’s Scandisk program wrote a log of files that it deleted during its operation; try to find that log after Windows 2000 or XP’s Chkdsk program runs.)

  31. Raymond Chen says:

    Well, it’s a bug that occurs if you change a default setting and even then only if something already crashed. (So it’s a rare case of an unusual case.) Yes, it’s a bug. But I suspect fixing it is going to be tricky since it’s not like somebody said, "Hey, let me introduce a bug!" Explorer’s "folders in separate process" setting is a subtle interaction of many things.

    Win98’s Scandisk and NT’s chkdsk are two completely unrelated programs. It’s not surprising that their feature sets do not coincide.

  32. Norman Diamond says:

    11/3/2004 5:23 PM Raymond Chen

    > Well, it’s a bug that occurs if you change a

    > default setting

    Sure, but who wouldn’t want to set "open folders in a separate process"? I thought it was going to follow the pattern set by Internet Explorer, when "browse in a separate process" first became available and then became standard without even being optional any more. It’s already sufficiently irritating when an application’s bug crashes that instance of an application; why would anyone opt for cascading that crash onto other unrelated windows?

    > and even then only if something already

    > crashed.

    Huh? I set that option when logging into a new Windows installation for the first time, and then forget about it. The "already" crash comes weeks later.

    > it’s not like somebody said, "Hey, let me

    > introduce a bug!"

    I never said it was. I said that Windows XP introduced the bug but did not say it was intentional. Your company’s lack-of-support and lack-of-fix policies are intentional (and even my level of acrimony falls short of them), but that’s hardly the same as pretending that introduction of the bug was intentional. Even though I didn’t experience this problem in NT4 and 2000, I didn’t think that the introduction in XP was intentional. (By the way in NT4 and 2000 I did experience Explorer crashes for unknown reasons, but most of the taskbar came back when Explorer was restarted.)

    > Win98’s Scandisk and NT’s chkdsk are two

    > completely unrelated programs.

    I know, but how could anyone possibly think that victims would not want a list of files that get deleted by either of them. In Windows 98 at least the victim can know which files to restore from backups. There are very few cases where the maker of Windows 95/98 could teach anything to the maker of Windows NT/2000/XP, but this sure is one of them, and I sure wonder why they didn’t. I’ve seen complaints on the net for years (and no not mostly from me).

  33. DM says:

    Raymond,

    I want to thank you for this post. It actually helped me figure out a bug recently. Basically, a window was not showing up when restored after being removed from/added to the TaskBar. I checked the coordinates when it was supposed to be visible and it was located at (32000, 32000). Go figure.

    DM

  34. Jade Lin says:

    Hi Raymond,

    I’m confused:

    > Set the resolution of each monitor to

    > 1024×768 and place them corner-to-corner.

    > At the bottom right corner of the third

    > monitor, you will see all your minimized

    > windows parked out in the boonies.

    768*3 = 2304px in the y direction, right? If the top left coordinates of the window are (3000, 3000), wouldn’t it still be off the screen because it’s still too far down?

    Am I missing something?

    — J.

  35. Raymond Chen says:

    Wow, you’re right. I failed to notice my math error, and apparently nobody else either until now!

  36. make it 1600×1280, and it will be 2nd screen to the right, 3rd down,

    in the middle on the right hand side of the screen.

  37. Because they are miniature title bars.

Comments are closed.


*DISCLAIMER: I DO NOT OWN THIS CONTENT. If you are the owner and would like it removed, please contact me. The content herein is an archived reproduction of entries from Raymond Chen's "Old New Thing" Blog (most recent link is here). It may have slight formatting modifications for consistency and to improve readability.

WHY DID I DUPLICATE THIS CONTENT HERE? Let me first say this site has never had anything to sell and has never shown ads of any kind. I have nothing monetarily to gain by duplicating content here. Because I had made my own local copy of this content throughout the years, for ease of using tools like grep, I decided to put it online after I discovered some of the original content previously and publicly available, had disappeared approximately early to mid 2019. At the same time, I present the content in an easily accessible theme-agnostic way.

The information provided by Raymond's blog is, for all practical purposes, more authoritative on Windows Development than Microsoft's own MSDN documentation and should be considered supplemental reading to that documentation. The wealth of missing details provided by this blog that Microsoft could not or did not document about Windows over the years is vital enough, many would agree an online "backup" of these details is a necessary endeavor. Specifics include:

<-- Back to Old New Thing Archive Index