5 ms·
90s apps used these Windows handle controls and it was not a performance problem. On computers 100 slower than today and with 1000 times less memory. BTW, the
by pillusmany 3y ago
90s apps used these Windows handle controls and it was not a performance problem. On computers 100 slower than today and with 1000 times less memory.
BTW, the current Windows Task Manager still shows the total HANDLE count on the CPU page.
They were not used in apps with complex UIs because native controls were hard to skin and didn't work very well when their size was very small (as complex UIs tend to need)
- bitwize 3y ago> 90s apps used these Windows handle controls and it was not a performance problem. For a while there, at least on Windows 3.1 and before, possibly some Windows 9x versions -- you had a GDI heap and USER heap of 64k each (one 16-bit x86 segment). If you allocated too many HANDLEs, you could blow one of these heaps. So it still made sense to be judicious about how many windows you created. Most Web browsers and word processors, for instance, drew their documents in the client area and did not use subwindows to position text elements.
- adzm 3y agoNote the HANDLE count is kernel objects; windows and graphics objects will show as USER and GDI respectively. Each of these has its own heap and limits.
- Someone 3y ago> 90s apps used these Windows handle controls and it was not a performance problem. That depends on the overhead per window. Microsoft Windows could use nested windows because it had separate Graphics objects to store such things as the current drawing pen, its position and the current font to use for drawing (https://learn.microsoft.com/en-us/windows/win32/api/gdiplusgraphics/nl-gdiplusgraphics-graphics https://learn.microsoft.com/en-us/windows/win32/api/gdiplusg...) In comparison, on the classic Mac every window had a GrafPort that defined a boundary region, a clipping region, the current pen position, size, drawing pattern, etc. The Mac could have such heavy-weight window objects because it didn’t nest windows. Instead, each window had a single list of controls that were much lighter-weight. my gut feeling says separating the drawing state from windows as in MS Windows is the better choice, but I also think having separate entities called “windows” and “controls” as on the Mac is the better choice. (its documentation is ‘less than stellar’, but it appears GrafPort still exists: https://developer.apple.com/documentation/applicationservices/grafport https://developer.apple.com/documentation/applicationservice...)
- nxobject 3y agoI think the tradeoff with the Toolbox is that positioning controls with relative coordinates, and updating views when scrolling etc, is a huge PITA since you have to do it in application code – for example, I'm not aware of many classic Toolbox applications that had bottom window status bars before that required relative positioning. A few early applications just assumed 512x342 fullscreen (i.e. MacPaint.) On the point of GrafPort still existing – Carbon was insanely backwards source compatible until QuickDraw was deprecated in the transition to 64-bit! [1] Conservatively-written 80s Toolbox code would work with some switching around of headers, and shimming getting/setting members of structs with functions. [1] https://www.highcaffeinecontent.com/blog/20150124-MPW,-Carbon-and-building-Classic-Mac-OS-apps-in-OS-X https://www.highcaffeinecontent.com/blog/20150124-MPW,-Carbo...
- Someone 3y ago> for example, I'm not aware of many classic Toolbox applications that had bottom window status bar I think that’s more either because they yet had to be invented or because giving up 16 or so pixels on a screen (the menu bar was 20 pixels high, IIRC) that’s only 342 pixels high wasn’t desirable. > A few early applications just assumed 512x342 fullscreen (i.e. MacPaint.) I think MacPaint can be forgiven for that. It was a miracle that it ran on a Mac with 128kB RAM. An application on that machine had about 28kB free for a program. MacPaint allowed you to edit a 50kB bitmap, double-buffering the screen to avoid flicker, with full undo. (And yes, paging to floppy disk isn’t fast. It did work, though)
- bitwize 3y ago> my gut feeling says separating the drawing state from windows as in MS Windows is the better choice, but I also think having separate entities called “windows” and “controls” as on the Mac is the better choice. I like to sum up the difference between Mac and Windows thusly. Probably glossing over a bunch of stuff but still: * Steve Jobs toured Xerox and came away with an idea, and a fairly shallow one -- the windowed, mouse-driven, document-centric interface. This is what he then had his team implement in the Lisa and Mac. As implementations go, it was really good and it looked good, but it was really procedural Pascal code beneath. (You had to handle window moving and resizing yourself in early Mac OS. There were library functions to help, but you had to code all that into your application's main loop.) * Microsoft, at right about the same time, was hiring guys out of Xerox PARC itself -- guys like Charles Simonyi -- and they brought with them a whole passel of ideas, not just concerning interfaces but also software design, things like objects and message-passing. That's why Windows could do things like handle the move and resize drag actions, and then just post WM_MOVE or WM_RESIZE to the target window. Windows were objects -- members of classes, even, and could receive messages. Granted, Windows couldn't run in 128K -- and Jobs would pivot completely with NeXT and deliver an object-oriented desktop based on Smalltalk grafted onto C (Objective-C), but initially it seems Apple were trying to build a cheaper, more user friendly Xerox Star and Microsoft were trying to get as much of the Smalltalk environment as would fit in a PC without requiring devs to learn a new language.
- dspillett 3y agoIt wasn't usually a performance problem because before you hit that point you hit a more simple resource problem: up to and including Windows 95¹, GDI had significant 16-bit internals (at least partly, I assume, for compatibility with older apps), and there was a limit of 16,384 HWNDs and so that 16,384 active objects of any type that needed a HWND. This could be a noticeable limit if running a number of certain apps at once anyway, but some apps had a habit of "leaking" handles making it more common to run into. IIRC this limit never applied to the NT family (NT, 2000, XP, …). -- [1] I can't remember if this was resolved at all in the 98 releases, I imagine not
- Narishma 3y agoDo you know why they made those handles public instead of private to each app?
- lmz 3y agoWindows can be interacted with cross process e.g. send an event to a window owned by another process, have a child window owned by another process etc.
- dspillett 3y agoIn the early days there was little need, nothing big enough to need that many would fit in the rest of the machine anyway. Also they were global so apps could communicate - the message queue was based on sending things to window handles, and the more advanced IPC methods like DDE and so forth were built on that. It is also how anything that interested with the task list or interacted with the desktop (adding decorations to windows etc.) functioned. This doesn't work if local handles can conflict with those in the other app. The amount of things that depended on HWNDs working this way is probably a significant part of why large chunks of GDI remained 16-bit in Windows95 despite things like the limit of 16,384 handles being an issue you could run into relatively easily by that point - too many existing apps & tools would have broken otherwise and limited people's desire to upgrade from 3.x. So a combination of "no point introducing extra complexity, at least early on", "the global pool is actually useful", and "once it was done that way, it was very hard to refactor without breaking compatibility with much of the existing application base". I think the compatibility layers on later versions did start separating the apps more, once breaking things was less of an issue (new versions existed that were directly compatible with newer APIs) so segregating the apps for stability reasons won out over being quite as backward compatible.
- stouset 3y ago> They were not used in apps with complex UIs because native controls were hard to skin Every time I’m forced to use Windows I’m blow away by the clownishness of every application deciding to skin its own custom windowing controls. This started happening some time around XP, I think?
- flohofwoe 3y agoWindows isn't any special compared to Linux or macOS though is it? IME 90's MacOS was most known for funny looking apps, the custom UI thing probably started with Kai's Power Tools: https://www.google.com/search?q=Kai%27s+powertools+screenshots&tbm=isch&ved=2ahUKEwixwIiQtuSEAxV1k_0HHb3bCroQ2-cCegQIABAA&oq=Kai%27s+powertools+screenshots&gs_lp=EgNpbWciHEthaSdzIHBvd2VydG9vbHMgc2NyZWVuc2hvdHNImy9QrQNYtS1wBXgAkAEAmAFEoAHtC6oBAjI1uAEDyAEA-AEBigILZ3dzLXdpei1pbWfCAgQQIxgnwgIHEAAYgAQYGIgGAQ&sclient=img&ei=xePqZfHJFfWm9u8Pvber0As&bih=857&biw=1019 https://www.google.com/search?q=Kai%27s+powertools+screensho...
- KerrAvon 3y agoThat's not true; apps with non-native UI were usually scorned by Mac users. KPT and other Metatools or (whatever they called themselves that week) stuff was an exception.
- amluto 3y agoI remember Borland shipping a toolkit with horrible built-in skins well before Windows XP. I even vaguely recall MS jumping on this bandwagon with some MFC styles.
- barrkel 3y agoThere was a fad for putting icons on dialog buttons. That was the most obvious Borland stylistic trait. Big green check mark on "OK" etc. That, and Delphi applications not having a minimize to tray animation due to the application window technically being invisible.
- 3y ago