Suggestion Box 4


The topic backlog from Suggestion Box 3 has nearly cleared out, and I've actually been enjoying not having to write up a reply every Monday for the past several months, but all good things must come to an end, and so, without much fanfare, we now have Suggestion Box 4.

Remember, the suggestion box is for suggestions for future topics. It isn't for developer support, bug reports, or ranting. Topics I'm inclined to cover:

  • Windows history (particularly the Windows 95 era).
  • Windows user interface programming in Win32, and shell programming in particular.
  • General programming topics (selectively).
  • Issues of general interest.
  • My personal hobbies.

Topics I am not inclined to cover:

  • The blog software itself. You can visit the Community Server home page and cruise their support forums.
  • Internet Explorer. You can try the IE folks.
  • Visual Studio. You can try one of the Visual Studio blogs.
  • Managed code. This is not a .NET blog. I do not work on .NET technologies. As far as .NET is concerned, I'm just another programmer like you. Occasionally I touch a .NET-related topic (including the annual "CLR Week"), but I do not bring any inside expertise to the subject.
  • Non-software Microsoft topics, such as product support policies, marketing tactics, jobs and careers, legal issues.
  • Microsoft software that isn't Windows. (Exchange, Office, ...)
  • Windows topics outside user interface programming. (Plug and Play, Terminal Services, Windows Messenger, Outlook Express, SQL, IIS, remoting, SOA...)
  • User interface programming in anything other than Win32. (Because I know nothing about it.)
  • Debugging a specific problem. (Not of general interest.)
  • Predictions for the future. (What's the title of this blog again?)
  • Participation in Internet memes.

Selected products at Microsoft participate in the Connect program, and many more have official blogs.

Suggestions should be between two and four sentences in length. Think of it as an elevator pitch: You have three seconds to get your point across. Please also search the Web site first because your suggestion may have already been covered. (Possibly as a suggestion that was submitted to an earlier Suggestion Box that was not accepted.) And remember, questions aren't suggestions.

The Suggestion Box will be open for only two weeks, and I will be much more selective about which one I choose to accept than in previous go-rounds. I'll answer one every Monday of 2012 (minus holidays and special events such as CLR Week), and once the end of the year is reached, that's the end of Suggestion Box 4.

Comments (141)
  1. Carlos says:

    This post blogs.msdn.com/…/1551916.aspx on the 16-bit version of the Windows 95 shell prompted me to ask:

    Why didn't you prototype the Windows 95 shell on Windows NT?  This would have saved maintaining a 16-bit version.  Early Windows 95 development must have predated the first release of Windows NT in early 1993, although it seems that betas of NT might have been available?

    A post on the history of Windows 95 development with the dates of key milestones and how it related to NT development (if at all) would be interesting.

  2. Chris says:

    How about some more of the history of Windows 95's Explorer? Wacky features that were considered but ultimately dropped, what the really early versions were like, that sort of thing.

  3. Mike says:

    Why are the Windows 7 system icons in the notification area colorless? Why did the go back to using regular tooltips?

  4. Mark says:

    Why has windows never supported task bar on more than one monitor?

  5. JLP says:

    Who are your favorite bloggers?

  6. Martin says:

    Did you notice, that switch to (or from) daylight saving time do all instances of Windows installed on a computer ?

    I cannot believe that this feature is a bug (undiscovered since Windows 95 ages and now in Windows 7 times it is still here). Please could you comment this ?

  7. GarethC says:

    Why can you not rename in Recycle Bin in Windows XP?

  8. Maxim says:

    What (if any) were the shell team's thoughts on the Calmira project? http://www.calmira.de/ blogs.msdn.com/…/545679.aspx

  9. Henke37 says:

    What is the point of the Marlett font? Why use a font for drawing symbols on the window buttons? That is, why use it back then?

  10. Amit says:

    In Windows XP (and possibly later versions as well): Why does it take longer for the task manager to appear when you start it from the secure attention sequence dialog than when you start it from the taskbar?

    (this is not to implement some stupid programmatic hack or anything like that. It's just that the delay is noticeable and I was wondering why)

  11. matushorvath says:

    How about the wina20.386 file that came with later version of MS-DOS? I have some fuzzy idea why it was needed, but still a more detailed explanation could be interesting.

  12. Niels says:

    When and how was the registry introduced on 16 bit Windows? How much of that carried over to Windows 95? I remember many years ago seeing something reminiscent of it on a Windows 3.1 system, but I know it isn't in a vanilla 3.1 installation.

  13. Amit says:

    (second and last question)

    In a multiple monitor setup, how does Windows choose where to place a newly opened window? The question comes from using VLC, where videos play in a hardware accelerated window. Sometimes the next video continues on the same monitor at full screen as the previous one and sometimes it starts playing full screen on the other monitor.

  14. Danail says:

    What's the story behind the WM_SYNCPAINT message?

  15. Falcon says:

    In Windows 95, 98 and (possibly) Me, the mouse pointer movement was noticeably jerky. In Windows NT, this was still the case with a serial (RS-232) mouse, but with a PS/2 mouse, the movement was smooth.

    I've always been curious about this.

  16. Joshua says:

    Around the time of WinXP SP2 x86, the API hook mechanism was standardized.

    Why wasn't the same thing done for x64?

  17. Mike says:

    Around the time Windows 95 got OpenGL support, I recall there being a number of new screen savers, including my own at-the-time favorite, Pipes. What were the origins of the screen savers that shipped with Windows and Microsoft expansion packs?

  18. Programmerman says:

    Windows 95 had one very quirky feature. If you gave the Start button focus and hit Alt+-, it would bring up a system menu for the Start button itself. From there, you could select Close and close your Start button and its associated menu. Why did this exist?

  19. David Walker says:

    I like the articles on the history of Windows.  I don't like the suggestions (or the comments) that JUST bash things that the commenter thinks should have been done differently!

  20. Ry Jones says:

    What other podcasts do you subscribe to (beyond The Business)? Have you tried Radiolab from WNYC?

  21. David Walker says:

    GarethC:  Why would you want to bother to rename the recycle bin?  You can't rename the mouse, or the street that you live on; some things have already been named.  :-)  

  22. Appreciator says:

    (Under "hobby" category) If you find frequent frustration and irritation in writing these, why do you continue?

  23. Philip Taron says:

    Suggestion (not a question or comment): You should do a series on a runtime code generator — a JITter for dummies. Small assembler, various issues with marking pages as executable & writable, lifetime management for runtime generated code…

    It would be fun! In the end, we could all have our own ATL thunk generators for any functions that didn't take a context parameter. Bonus points for illustrating currying in the general case.

  24. Benjamin Smedberg says:

    In Windows Vista/7, when Windows are grouped together in the taskbar Windows uses an icon pulled from the application binary for the entire group. I see on ITaskbarList3 that I can add overlay icons to a taskbar group: is there a way to change the icon completely? I need this because I'm using a single binary (xulrunner.exe) which is a runtime for multiple applications.

  25. Chris says:

    How did the close button end up to the right of the minimize and maximize/restore buttons? In OS/2, it is on the left, which left the two other buttons in place.

    (Third attempt to post. Some needs to be taken out and beaten.)

  26. rs says:

    (1) Why is there a TranslateMessage function to generate WM_CHAR messages in the message loop? Why is this not done by DefWindowProc for WM_KEYDOWN?

    (2) Why does Windows (historically) return 2 for MulDiv(1, -0x80000000, -0x80000000) while Wine returns zero?

    (3) What is the recommended sequence of actions for switching a window from WS_OVERLAPPEDWINDOW to WS_POPUPWINDOW style, and back?

  27. Sheng Jiang says:

    What happened to IThumbnailCapture? Is it dead with XP's preview handler? Or is there any thumbnail provider exposing the interface in Vista or above?

  28. Adrian McCarthy says:

    When converting a point size to pixel height for a LOGFONT on a given device context, you typically use the LOGPIXELSY in the calculation: pt_size * LOGPIXELSY / 72.  But what if you're trying to specify a font with a diagonal escapement and orientation?  And what if the devcie context is for a printer with different DPI values in the horizontal and vertical directions?

    Empirically, the results seem printer dependent, which probably means the drivers are buggy.  How is it intended to work for text at a non-zero angle?

    stackoverflow.com/…/how-do-i-specify-font-height-at-different-orientations

  29. Jeremy says:

    The MSDN documentation for SetClipboardData states "When responding to the WM_RENDERFORMAT and WM_RENDERALLFORMATS messages, the clipboard owner must not call OpenClipboard  before calling SetClipboardData" but the MSDN documentation for WM_RENDERALLFORMATS states "When responding to a WM_RENDERALLFORMATS message, the clipboard owner must call the OpenClipboard and EmptyClipboard functions before calling SetClipboardData."  Which is it?

  30. fds242 says:

    Starting with Windows XP's themes, the individual tab pages inside a tabbed dialog box have a light, white-ish background rather than gray. What's the recommended way to achieve this light background/transparency if you would like to roll your own system creating the Tab Control manually?

    If you use PropertySheet(), this is done for you automatically, however, only if the tab child dialog box contains at least one STATIC control. Why is this seemingly strange requirement?

    Why do Windows Task Manager's tab pages still have the gray background?

  31. Adrian says:

    Way back in the modality series, you showed a way to use WM_QUIT for a timed message box.  It suffered from an assumption that the WM_QUIT message would be the first in the queue, and thus could end abruptly without letting the user save his/her work.  (See the comments in:  blogs.msdn.com/…/385100.aspx )

    Did you ever come up with a solution?  The WM_QUIT was buried under messages from some enterprise anti-malware program that posts its own private messages onto the thread queues of all GUI processes in the system.

  32. Pascal Binggeli says:

    Not sure if of interest, but at some point during the development of Win7, a mysterious iPadding member has been added to the TVITEMEX structure. It has been renamed iReserved and left undocumented for developers in the final SDK. So, what is the way to implemented the padding feature found in the Windows 7 Explorer tree view ? (Between Favorite and the rest) (And no, iIntegral is not the same thing.)(And apart from rewriting the whole tree thing.)

  33. Pascal says:

    Not sure if of interest, but at some point during the development of Win7, a mysterious iPadding member has been added to the TVITEMEX structure. It has been renamed iReserved and left undocumented for developers in the final SDK. So, what is the way to implemented the padding feature found in the Windows 7 Explorer tree view ? (Between Favorite and the rest) (And no, iIntegral is not the same thing.)(And apart from rewriting the whole tree thing.)

  34. Yury Shulzhenko says:

    Can you shed light on how windows activation works. In particular how it is possible that GetActiveWindow() != NULL (local thread state) and GetForegroundWindow() != NULL (global state) and GetActiveWindow() != GetForegroundWindow() at the same time (and this is not a temporary state that lasts only few seconds).

  35. DavidD says:

    I suppose this falls under the General Programming category.

    Does your team/division go back and revise code based upon newer enhancements to the languages.  For example, with C++0x, there are many new language enhancements.  Would those manifest themselves in existing code, or is it the case (as you tend to imply), that once its written/tested/shipped, it is too costly to go back and rework/retest, etc. just to use newer (and safer and more readable) language constructs?

  36. Dan Bugglin says:

    I may be able to help with some of these, I love loading old Windows on virtual machines. :)

    @Carlos: What do you think the Shell preview for Windows NT 3.51 was?

    @Chris: You can grab a copy of the aforementioned Windows NT 3.51 and the free Shell preview download to see yourself.

    en.wikipedia.org/…/Windows_NT_3.51  A paragraph of info about it is buried in here.

    @Niels running regedit.exe on a NT 3.51 or 3.11 system will reveal the first Registry Editor.  IIRC it was mostly for managing file associations and classes and such, I think?  I forget, it's been awhile.

    @Henke37 Because the capability of drawing text on a button in any font is built in.  Drawing images is not and requires ownerdraw which is a bit more work.

    @Amit: Didn't we just have an article about something like this with windows on multiple monitors?  I think it's up to the application to decide.

    @Programmerman: Alt+- is the hotkey for opening the system menu for MDI windows.  It sounds like a bug that the hotkey was not blocked.

    @Chris: Good question, in 3.11 it's on the left as well.  I assume it wasn't moved as much as turned into the application icon.  Then the X was added since there was no longer a clear way to close the window.

    @fda242: IIRC with my experiences wrangling visual styles out of .NET 1.1 it's drawn for you, but you have to make any controls overlayed on top of it have a transparent background so they don't paint the control color over it.  Of course with the Visual Styles API you can always draw the background yourself as needed.

    In Task Manager's case, I theorize someone made the tab pane have a panel child with the control background color covering the whole thing, maybe.  Grab Spy++ and check.

  37. Aaron says:

    Since the Chicago team was designing and implementing the Windows 95 User Interface while the NT team was busy trying to ship NT 3.1 with an interface approximately equal to the Windows 3.1 UI, how did the new Win95 UI get into NT for 4.0?  Was the code from 95 simply adopted into the NT project, did they rewrite it or major parts (say, explorer.exe) from the specification, or was there some other sort of code-grafting process?

  38. Why does GetTabbedTextExtent() never seem to return the correct text extent for a string actually containing TABs, where "correct" is defined as the actual size of the text rendered by either DrawTextEx or TabbedTextExtent()?

    Please see groups.google.com/…/36b608f409deb516 and the rest of the thread this message appears in for more details if necessary.

  39. Anonymous says:

    I'd like to hear about the GetRandomRgn() API call, specifically how it ended up with that particular name, what the intended purpose of the third parameter was, and why it ended up being extra-random by returning screen coordinates in NT and window coordinates in 9x.

  40. Josh says:

    I'm interested in why Alt+F4 was chosen as the keyboard shortcut for closing a window.  It's not exactly easy to reach that combination quickly.  I assume it has something to do with the Alt+F4 being a shortcut not commonly used by applications.

    It has always bothered me that I have to stretch my fingers to close a window.  Mac's Cmd+Q (or W) is much easier to reach.

  41. GrumpyYoungMan says:

    I'd like to hear more about poor programming practices that you've encountered in software that cause failures / compatibility issues with 64-bit Windows, whether shell related or otherwise.

  42. DaveN says:

    History and "inside info" about the addition of major features to Windows – not less significant things like cow pasture wallpaper, but functional features like tcp/ip, winsock, AD, etc.  People tend to think about things they see every day, but I'm referring to the real game changers.

  43. Random832 says:

    @Josh – From what i've read, some of the early windows UI design was based on IBM CUA standards, which can also be seen in Motif/CDE on Unix, and which (IIRC) had a whole set of Alt-Fx key bindings for window management.

    The function keys were on a different place on the XT/AT keyboards.

  44. Nathan says:

    Hi Raymond,

    I recently finished reading Show Stopper, and I'm curious about the relationship between the Win95 team and the WinNT team. Was it strained, or was there camaraderie? Any code sharing/reuse, especially in areas one might not expect? Was Win95 started as a stopgap, or was it intended to live as long as it did? Or perhaps even longer?

    Thanks for writing such an interesting weblog!

  45. Kelden says:

    Why is the focus management so crappy in windows?

    When I'm typing a text, the focus should never be allowed to move to another program.

    I always hate it when I write an email (letter, code, …) and a window pops up,

    asking some stupid questions and I accidentally press space or return before I see the box.

    Never ever lose focus while you are typing.

  46. Brian says:

    I first heard about Good Eats way back in 2004 with your 'Cooking for Engineers' post.  It's since changed how I approach cooking.  And I've just realized I've been reading you for at least six years.  Wow.

    The question, which stands a minimal to trivial chance of answering:  favorite Good Eats recipe you've tried?   The chicken wings are spectacular, if you're in to that kind of thing.

  47. Mott555 says:

    I'd enjoy hearing stories about sloppy/ugly code or strange workarounds or code comments during the development of Windows 95 (I'm assuming there are a few since it was a big jump from Windows 3.1), how they got there, anything TheDailyWTF-worthy. The type of code that works surprisingly well but makes you hate your life when you read it.

  48. Ian B says:

    I've always been curious, what is the difference between the F5 menu and the F8 menu on boot? Everyone knows you can use the F8 menu to reach Safe Mode or what not, but F5 seems to bring up the same menu. In particular, I've noticed very sporadically that sometimes you wont see the Disable Automatic Restart option in F8, but you will in F5, so I guess I know they're not exactly the same :). Thanks for any insight!!

  49. Adam S says:

    Why does holding control when clicking New Task in Task Manager launch a command prompt? This appears to have been added in Windows XP..?

  50. Ben L says:

    I noticed that the shortcuts (.lnk) MS office and some other applications make do not allow editing of the Target, or Icon. Where is this feature controlled? Is there a way for the user to make these, or override this mode?

  51. Drag and drop to taskbar says:

    Why in Windows 95/XP could you not drag and drop a file into a running application on the taskbar?

    If I recall, it gave you a message saying that you couldn't do that and you had to restore the app then drag/drop the file onto it. If Windows knew what I was trying to do, why didn't it just do it? I assume there is some technical reason behind this limitation that probably has an interesting story.

  52. Clipboarder Gadget says:

    3 suggestions:

    How come that normal processes can kill elevated ones via TerminateProcess, but not do a trivial ShowWindow(hwnd, SW_MINIMIZE) Only explorer seems to be able to do so somehow.


    Why doesn't Windows memorize all clipboard listeners on his own and makes everyone think that the process is the only one in the clipboard chain? When applications forget to forward the message to the next clipboard listener (which easily happens when not reading MSDN) applications will stop working.

    Inserting rings into the chain also provokes stackoverflows in other processes WM_CHANGECBCHAIN handlers.


    Why is the desktop threatened so special in window ordering?

    When selecting a folder in the desktop and then immediately closing it, the focus should go back to the desktop (like pressing Win+D), but some random window recieves it. Is that a feature?

  53. f.aa says:

    Why can't I rename the recycle bin

    blogs.msdn.com/…/8080154.aspx

    Dragging and dropping to taskbar

    blogs.msdn.com/…/269237.aspx

  54. Ismail Donmez says:

    What is the maximum width of a widget in Windows CE, I am asking this because we were doing some tests and looks like if a widget gets bigger than 2^15 pixels the widget gets black. Searching in MSDN & search engines yields no results.

  55. Antonio Rodriguez says:

    I've always been interested in how the architecture of Windows Extended 386 Mode related to Windows 95's architecture. Windows 3.1 plus Win32s seems to be the base for Windows 95 functionality, even if it ran 32-bit tasks in a shared memory space and with collaborative task switching. Also, it seems that the VFAT filesystem from the Chicago project got backported to Windows 3.11. There seems to be close to no information about this in the Internet. What are the differences between Windows 3.1's VxD kernel and Windows 95's one (apart from the obvious)?

  56. OfekShilon says:

    What does SHChangeNotify really do? MSDN mentions you should call it after an SHFileOperation (msdn.microsoft.com/…/bb776887%28VS.85%29.aspx), yet (1) a code sample right there on MSDN doesn't (msdn.microsoft.com/…/cc879182.aspx), (2) as far as I can tell explorer windows are updated properly after SHFileOperation calls *without* an SHChangeNotify call, (3) I just don't understand this API design: if there are any shell-internal updates to be made, SHFileOperation is fully capable of doing them itself, without requiring extra user code. Are there scenarios where a user might prefer to skip such a notification?

  57. robert hir says:

    Why no more capability to do an "Explore from here", like in the Windows 95 Powertoys. I've been using it for about 15 years now (95 through XP), and really miss it in Windows 7 Explorer capabilities. With Win 7 there's a ton of folders and such in the left pane you can't supress, and it hops all over the place when I navigate around.

  58. Robert Hir says:

    @Antonio Rodriguez, Andrew Schulman did a book called "Unautorized Windows 95, which covered your questions and much more. I'm sure that Raymond would have much more authorative andswers and such, but there is a whole book out there with sample programs and such if you still had your Windows 95 CD handy you could expirement with first hand. It was a good read back in the day.

  59. Anonymous says:

    It would be interesting to know the logic that the Windows shell uses to determine what icon to show for a shortcut (lnk).  Especially with the recent announcement of security advisory 2286198, it seems there's something more going on there than meets the eye (unless the shell does something silly like not using LOAD_LIBRARY_AS_DATAFILE when grabbing the icon, thus allowing DllMain to run, but I hope the shell team is smarter than that ;)

  60. Kelden says:

    @robert hir

    What do you miss? You can click on "Open in new window".

  61. Joshua says:

    @Anonymous (20 Jul 2010 4:26 PM)

    Since Raymond blogged about "Don't use LOAD_LIBRARY_AS_DATAFILE" I'll bet Explorer doesn't. If so, oops.

  62. nobugz says:

    The WS_EX_COMPOSITED window exstyle is interested.  It solves a flicker problem for the kind of Windows Forms programmers that drop hundreds of controls on their form.  I've been recommending it in forums for a while, but it doesn't appear to be completely trouble free.  No solid diagnosis though.  I'm  curious how it works when only a single control repaints itself.

  63. configurator says:

    Why is the maximum size for a form equal to total screen size + (12, 12)?

    Note: This is in .NET, I don't know if this happens in standard Win32.

    Usage case: MDI children, where the parent has scrollbars.

  64. Random832 says:

    "Since Raymond blogged about "Don't use LOAD_LIBRARY_AS_DATAFILE" I'll bet Explorer doesn't."

    No, DONT_RESOLVE_DLL_REFERENCES is the one you're not supposed to use (at least that's what i could find from a search of the blog).

  65. acha11 says:

    Imagine you weren't specifically a Win32 UI guy: what software or other technical realm would you like to work in, and why?

  66. Leo Davidson says:

    Suggestion: RasEnumConnections would make an interesting case-study of how API designers (and documenters) need to be careful of subtle issues resulting from structure-sizeof variations between OS and/or SDK versions.

    (If you ask it for the required buffer size in the naive way, which is what the documentation suggests, your code will not work with Windows versions older than the SDK you compile with.)

    See my "A fix to work with older versions of Windows" comments in the community content for the API:

    msdn.microsoft.com/…/aa377284%28VS.85%29.aspx

    (There's also the usual race condition w/ functions which you call once to get the buffer size and then again to get the data, but that's less interesting.)

  67. WndSks says:

    @Ben L: Those are special MSI (aka Darwin) shortcuts (You can have a shortcut to a feature that is not yet installed etc) The ugly part of this is that they actually point to %windir%installer{someguid}stub.exe so the shortcut gets the correct icon and context menu

    @Clipboarder Gadget: SW_FORCEMINIMIZE maybe?

  68. WndSks says:

    @Leo Davidson: If you look at RasEnumConnections in a older SDK like Platform SDK 2003 you will see that passing NULL is not documented as a valid parameter (And the sample code uses a loop starting with a buffer of sizeof RASCONN bytes)

    This sizeof(STRUCT) problem is very common in the win32 api (GetVersionEx,Shell_NotifyIcon,GetOpenFileName etc) and if you want to support down-level systems, you need to use constants like OPENFILENAME_SIZE_VERSION_400 (Now that we have had the NTDDI_VERSION system for a while we can only hope that all future structs take a version value like NTDDI_WIN7 and not a byte size so re-compiling with a new SDK will never break existing apps)

  69. Larry Hosken says:

    Reader contest: Worst-Case Airtight Hatchway Scenario

    Encourage your readers to leave comments: their entries for the Worst-Case Airtight-Hatchway-Security Scenario contest. Winner is the comment w/the silliest way that someone can pwn a Windows machine on which they already have admin rights.  Sorta like Bruce Schneier's Movie Plot Threats contest, but more specialized.

  70. Cheong says:

    @Gregory Kong: I think the Win7 taskbar is made to behave like the program manager of Windows 1.01 with start menu. (i.e.: It's combination of 2 Microsoft components, not copying from OSX)

  71. cmv says:

    What were the driving requirements behind the shell design? I more interested in a developer's perspective (the shell namespace, interfaces, etc).

  72. cmv says:

    of course I meant to write "I am more interested"…not enough caffeine yet :)

  73. Mike Dunn says:

    When designing a new API or struct, how do you know when to put in a "reserved" field or param? Once you do decide to do that, how do you decide on its size? For example, WIN32_FIND_DATA has two reserved DWORDs. How were "two" and "DWORD" decided on?

  74. Mike Dunn says:

    What was the idea behind HDS_FILTERBAR? What was its intended purpose?

    Back in the days when a new common controls DLL was released with IE, IE and/or Explorer took advantage of new features in each new DLL right away, but that didn't happen with HDS_FILTERBAR. Why?

  75. Mike Dunn says:

    Referencing: blogs.msdn.com/5658731.aspx (I'm taking a risk on this one, since this question is a repeat of a comment I posted there):

    You said that even though the functionality behind EM_GET/SETHILITE was removed before Vista shipped, the messages couldn't be removed from the header file. Why?

    APIs were changed between betas and RTM of Vista, such as transactional NTFS and registry, which caused changes in the header files and broke previously-compiling code. Why was it impossible to remove two constants that were even older than the transactional APIs?

  76. Mike Dunn says:

    (Yes, gentle reader, I did have all these written up ahead of time in preparation for this day.)

    Do you have any insights into the Microspeak term "parking lot"?  I saw it on a Powerpoint slide at an MVP Summit a few years ago.  It was in a sentence fragment so I couldn't tell what part of speech it was, but it seemed to mean "ask me long or off-topic questions after the meeting is over."

  77. nobugz says:

    I am curious about the LVITEM structure.  It is missing the common cbSize member.  How can the ListView control guess what version of the structure is passed?

  78. What about the funny thing WinG did back then in Win 3.11? On install they ran some imagery and (guessing) testing all kind of ways to get performant blits. What did it do actually and what for?

  79. px@i.kiev.ua says:

    Why fullscreen 3D mode supported only on primary display, and user can't choose on which monitor to start fullscreen 3d app?

  80. Li Xiong says:

    How about the hisotry of the Windows Error Reporting/Debugging support. At the beginning, we have the AEDebug key, Dr. Waston. Then there are JIT key. There are Error Reporting Service. And in Vista, there are WerFault…

  81. Morten says:

    WS_EX_TRANSPARENT. When to use it, when not to use it, and what are the implications concerning invalidation and painting.

  82. Leo Davidson says:

    @WndSks: I don't think you've grasped what makes RasEnumConnections interesting compared to most other APIs which take structure sizes.

    Most APIs are fine because they just fill in as much of the structure as they can (i.e. up to the minimum of the size they know about and the size the application specified) and zero out the rest.

    RasEnumConnections is interesting because it makes assumptions — which seem fine until you really think about them — about the OS and caller structure sizes, and mixes the two of them up. If the caller's size is larger than the OS's, the OS will tell the caller to allocate a buffer which is too small.

    MSDN makes no mention of the NULL argument only working in certain versions of Windows, even if it was undocumented before, so I would expect that to work in any version. Even if it doesn't, a future version of Windows may extend the structure further and cause the same problem. Even if that never happens, I still think it's an interesting thing to talk about to encourage people to think:

    "How will this work in the future when these structure sizes change? Am I mixing my sizes with the callers?"

  83. Leo Davidson says:

    Re Li Xiong's suggestion, "How about the hisotry of the Windows Error Reporting/Debugging support."

    If that's discussed, it'd be interesting to hear the rationale behind making the user wait for Windows to "check for solutions" before being offered the chance to restart the crashed app.

    (i.e. Why isn't the app restarted immediately while the check is done on the background? Is it in case the check can fix the problem and prevent the re-run from crashing immediately? In my experience the check never finds anything and just delays restarting the app. I'd like the check to be done in case it does find something, but I'd also like to get on with things ASAP.)

  84. Gregory Kong says:

    Dear Raymond;

    What was the design team smoking when they decided to make the Win7 Taskbar behave more like the OSX Dock? More seriously, which design elements/usability guidelines were they trying to add in/adhere to?

    I ask because I am an old-school PC power user/administrator, and I HATE HATE HATE the OSX Dock – making any part of Windows like the Max OS is suboptimal in my book. It is AFAICT pretty much undiscoverable how to revert the Taskbar to XP/Vista function (separate QuickLaunch/active apps sections) while maintaining Win7 form (Aero Peek etc), and given that Windows is all about backward compatibility, this is somewhat disturbing.

    Note: I do know how to revert it, I just want to know what they were smoking when they came up with it. Or, if you came up with it, what *you* were smoking, I guess… ;)

  85. Anon says:

    What's your relation to Quake (the videogame) http://www.mobygames.com/…/quake Were you an early tester/debugger?

    (Sorry this is offtopic but I've been waiting years for your suggestion box to reopen. I even asked this question the Wikipedia discussion page but I guess no one saw it)

  86. matushorvath says:

    RE: wina20.386

    Just to update my previous suggestion: I would be very interested in how Windows 3.0 found and loaded this file. It seems to me there must have been some magic happening, e.g. DOS somehow forcing the driver to be loaded by Windows. Because Windows by itself did not know it needs to load some additional driver, or did it?

  87. Wizou says:

    @nobugs: You always use the mask field to tell Windows what fields of LVITEM are to be used. No need for a cbSize

  88. Skizz says:

    Why was the Start Button and the Task Bar placed at the bottom of the screen by default? From a usability point of view, reading bottom up seems less user friendly than reading top down (and I've always moved the task bar to the top of the screen as it feels more intuitive up there). I've always wondered if this was a 'do it different to the Mac' decision to avoid any possible lawsuits (which had happened a few times in the 80s).

  89. Farproc says:

    How would one host *two* Active X controls in the scratch app. On the one hand it is simple, but time consuming to implement all the objects and their various interfaces. On the other hand, none of the documentation explains how to choose which control to send IOleInPlaceActiveObject::TranslateAccelerator to, or IOleInPlaceObjectWindowless::OnWindowMessage to. (Or indeed, how to track or set "focus" if there is at least one windowless control).

  90. Vegard says:

    Is there a way to immediately unload a DLL, which was injected into multiple processes as a global hook, after the hook has been removed?

  91. Kelden says:

    @Skizz

    Afaik this was already explained by Raymond.

    Too many programs moved them self to position 0,0 instead of using the API.

    And 0,0 was top left behind the tasbar.

  92. kero says:

    PrintWindow is bit buggy, isn't it?

    Why it so hates CS_PARENTDC (CS_CLASSDC, CS_OWNDC also)? :)

  93. Feroze says:

    I have seen a service process (not microsoft) forking a worker process, but that WP is using an executable name like "foo.tmp". How is this possible – dont all executables have to end in .exe extension?

  94. Chris Walken says:

    How did the design for "display contexts" come about? Who came up with that idea? At the time it was quite brilliant considering the memory size of a normal machine and still works great today.

  95. Anonymous (Mosquito buzzing around) says:

    I have my usual genuine shell/Explorer/taskbar related questions whose answers I never found:

    •  Shell: Why are taskbar live previews are not retained in Windows 7 when using Fast User Switching.

    •  Shell: Why is the sort bar restricted back again to Details view in Windows 7 when it was improved upon by adding it to every view in Vista?

    •  Shell: Why did the taskbar infotips lose their icons from Vista to Windows 7?

    •  Shell: Why can't I run the 32-bit shell in Windows 7 any more?

    •  Shell: Why are "Arrange by" and "Sort by" only there in Libraries in Windows 7 but not all folders?

    •  Shell: Why does Windows 7 Explorer force each toolbar on its own row when IE8 doesn't?

    •  Shell: Milestone 2 of Windows 7 showed the number of combined taskbar windows in a circular little overlay icon. Why did this not make into RTM?

    •  Shell: Why does selecting multiple taskbar items using Ctrl and choosing group close or group minimize not available in Windows 7?

    •  Shell: Why does the Game Explorer limit customizing command line, target etc in Windows 7?

    •  Shell: Why are all three power profiles not shown from the taskbar power icon in Windows 7?

    •  Shell: Why is the sorting order in Vista/7 not constant? Sorting by Name or Type is Ascending but sorting by Date or Size is Descending?

    •  Shell: Why is autorefresh forced in Vista/7 Explorer?

    •  Shell: Why doesn't the Preview pane save this state per folder like XP's Filestrip view?

    •  Shell: Why does the View Available Networks (VAN) UI give quick access to dial up, VPN and wireless connections but not ethernet connections?

    •  Shell: Why was the remaining functionality of File Types dialog (such as defining a new file extension and associated file type without doing it programmatically, defining/editing custom secondary verbs by the user who knows nothing about programming, showing extensions only for specific file types, customizing the file icon and IE related settings like "Confirm open after download) removed in Vista?

  96. Alberto Martinez says:

    @Feroze:

    File extensions are like labels: they do help in identifying the things they are sticked on, but they aren't a requisite (e.g., a can of beans is still a can of beans without a label). The labels are useful to the shell (Explorer) to know what action it should perform when an user double-clicks on an file, but they are only informational.

    From a Win32 point of view, AFAIK a file extensions mean nothing, you can pass a file with any extension to CreateProcess() and it would work fine (supposing the file is actually an executable). Borland products like Delphi use "custom" libraries with the extension .BPL that are if fact regular DLL's with the extension changed.

    This is applicable also to data files: you can rename a Word document using another extension (for example "document.test"), and open it from Word using the "all files" filter. Even more, you can rename it to "document.xls" and it would work fine as long as you open it directly from Word.

    On the other hand opening a "mislabeled" file from Explorer won't work since Explorer relies in the extension to know what program use to open it.

    Related: http://thedailywtf.com/Articles/Pipe-Up.aspx

  97. CarlosPC says:

    Why is there a Windows 3.2? I thought that Windows 3.11 was the last before Windows 95.

  98. Paul M. Parks says:

    Answers about a remarkable number of these suggestions can be found with a simple web search (like Windows 3.2). Still, Raymond's perspectives and background stories would be entertaining, even for these.

  99. I'd like to ask a rather open-ended (and hard) question:

    Given your experience keeping Windows compatible with past versions, what realistic* changes would you make to versions of Windows from 1.0 through to 3.11 if you were able to go back in time and change them?

    * realistic in this context is something that fits within the constraints these versions of Windows had to fit in – so a change to Windows 1.0 must be something that would work on an 8086 with 256k running from floppies, while a change to Windows 3.11 can assume a 286 with 640k conventional RAM and 256k XMS, with a small hard disk fitted.

  100. WndSks says:

    @Leo Davidson: The callers size should never be larger than the OS size, you need to code to your minimum supported OS version and dynamically adapt at runtime if you need newer features

  101. Cheong says:

    Now I have 2 displays connected to my computer. With software bundled with display driver, I'm able to configure them as extended desktop with top-down design (with the main display at the bottom).

    Now I wish to ask, whether there's any supported way of making them behave as single large display? (e.g.: click "maximize" button will make that window cover both displays, etc.)

  102. Anon says:

    How do you come up with new shortcut keys and how do you deal with different keyboard layouts? What is the process; is there a company-wide procedure to keep things consistent?

  103. Nick J says:

    Do the dwReserved parameters ever get used later on?

    How is it decided when to add one or not?

  104. Mark says:

    When you close a window its location gets saved.

    When having 2 monitors and you close windows on the second monitor then its location is saved and it opens on the second monitor at that location by default.

    When having a laptop and you work undocked you only have one screen, but the windows that were opened on the second monitor don't show anymore because they open on the second (unattached screen).

    Why aren't these windows automatically moved to the first screen when windows only detects one screen?

  105. Tony Lezard says:

    Please could you do an article about the Volume Shadow Copy Service (VSS) – in particular how to use the API to enumerate and recover previous versions of files and folders? I find the documentation that is out there impenetrable, and there is a dearth of sample code for using it in this way.

  106. GunSmoker says:

    2 Mark: isn't it obvious? Cause it's application responsibility, not Windows. Windows can't move your windows on your own, saying "oh, you're placing it on missing monitor, let me move it for you". What if placing window off-screen was your intention? Recall that minimized windows are real windows, that are placed in the corner of desktop area, long way away from monitor'a area. Do you want them to drag into visible area too?

  107. Prakash says:

    I have a taskbar-related question. For years, (I think since IE4 on Windows 95), the taskbar has allow minimizing the app if it is active and clicked again. This greatly increases usability as you don't have to position your mouse accurately on the minimize button and also the minimize button is at the top whereas to switch apps taskbar is at the bottom. But in Windows 7 when I set buttons to combine, clicking a grouped application’s taskbar button or thumbnail when it is active (in the foreground) or inactive (in the background) always switches to that app. Only ungrouped application buttons minimize upon being clicked again. Why was this change made? It is why I don't use button combining. Clicking on a grouped thumbnail should minimize it when the same thumbnail’s window is already active, that is, in the foreground. If the app was in the background and its thumbnail was clicked, only then it should switch to that app. This was the behavior on Windows XP when grouping was on.

  108. John Wilson says:

    I want more stories about Bob.  I like Bob.  ( blogs.msdn.com/…/1184734.aspx )

  109. Chris W. says:

    I wonder: Does the old Windows codes, say 1.0 to 3.x and Win9x still exist completely in a readable form (not randomly encrypted)? And if yes, how are they stored and mantained (version control, archive, cd, streamer, stone)? Will they ever become public?

  110. Mike Dunn says:

    Referencing blogs.msdn.com/9972520.aspx where you talk about someone's blog post about what he thought was a TweakUI bug: How do you find those web pages? Do you:

    • occasionally do web searches for "TweakUI"?
    • subscribe to tons of programming blogs?

    & have a Google alert set up for various Windows-related keywords?

    % do something else that I haven't thought of?

  111. Mike Dunn says:

    Do you know the meaning behind the volume labels for the Win 7 DVD and the filenames of the Win 7 SDK ISOs? For example, the Win 7 x86 DVD's volume label is "GRMCULFRER_EN_DVD". What does "GRMCULFRER" mean?

  112. Guillermo Riquelme says:

    Why not incorporated in Vista and Windows 7 the "Classic Luna Theme" as an option, instead of only "Classic Windows"?

  113. WndSks says:

    @Mike Dunn: I'm guessing here but, G=7th letter (win7?:), RM=don't know, C=client (vs server), UL=ultimate SKU, Fre=Free (vs checked build) R=retail (vs OEM and volume license)

  114. Vilx- says:

    Not a topic suggestion but a suggestion nevertheless: When you do series (like "Part 1", "Part 2", or "Episode 1", "Episode 2", etc.) provide links to next and previous entries, otherwise it gets awkward if you want to read it all.

  115. Apz says:

    @WndDsks : RM is used to mean Release Model for certain products – maybe it's being used here

  116. In XP (and Vista/7), how mouse pointer acceleration works was changed (the Control Panel 'Enhanced pointer precision' checkbox).

    One of the drivers for the change was to better handle high DPI monitors, by scaling pointer movement by a factor that included monitor DPI.

    But by mistake, the scaling was 'anti-scaling' and included a factor of (MonitorRefreshRate/MonitorDPI) which causes pointer movement to be REDUCED for high DPI monitors, rather than INCREASED as one would expect.

    (I've written about this on my blog: donewmouseaccel.blogspot.com/…/out-of-sync-and-upside-down-windows.html and also about problems with how the acceleration calculation fractional remainders are handled: donewmouseaccel.blogspot.com/…/windows-mouse-pointer-acceleration_28.html)

    These problems are fixed in Windows 7, and I'd love to know any inside stories and why it took so long to fix.Mark Crannr

  117. Ray (not that one) says:

    When Windows 95's desktop was designed, any idea what the reasoning was behind the desktop's icons stacking vertically, when everywhere else in the UI, icons stack horizontally in a window?

  118. Jon S says:

    I'd like to hear something about Win32s. I've had no personal experience with it, but I'd like to hear something about how it worked, or any nifty tricks it had.

  119. David Walker says:

    @Cheong:  To stretch one application window across two displays, you need to have it not-maximized (maximize will maximize it to one window), and then resize it across both windows the same way you resize any non-maximized window.  Works great.  There's no convenient single-click way to do this, though.

  120. John C. Kirk says:

    I always benefit from the entries about "paying your taxes" as a developer, so I'd like to see more of them. However, I can't suggest anything specific, because I'd mainly like to read about things that have never occurred to me before.

  121. Al C says:

    At one time in Windows or NT, I think about 10-15 years back,  accessing a file would change the file accessed date/time of the file.  That is good.  However, changing the accessed date/time of the file counted as modifying the file, so it also changed the file modified date/time of the file. That is kind of bad.  The file accessed time and the file modified time were thus always identical, except for maybe some obiwon clock anomalies.  That was obviously wasting a good field on nothing.  I believe that somehow I asked someone at MS about this and was told that it was in conformance with posix.  As posix documents are priced out of my range, I was never able to verify.  Can you give any history of this, before or since?? Thanks.

  122. Tihiy says:

    Back to Windows 95, there were a lot of undocumented stuff / assembly quirks which allowed to receive pointers to system internal structures, like IMTEs/MODREFs with kernel32 functions or IsWindow returning direct pointer to WND structure (!).

    Since Win95 (98,Me) they weren't actually obfuscated. So the question is – did those quirks ever made a problem? Have any Win95 era Microsoft software abused them? Does Windows team now use some special measures for obfuscating/protecting important internal variables?

  123. A:-)Brunuś says:

    Why does NTVDM create empty io.sys and msdos.sys files every time a DOS app is launched? Is it a bug? How can I disable this? It didn't do it in NT 3.x; it was introduced in NT4. Sorry for my poor English.

  124. Tergiver says:

    You made a couple of blogs about WaitForInputIdle. I have had a nagging question about that function for years now and have never seen a good answer: What exactly causes WaitForInputIdle to return WAIT_FAILED?

    I encounter this seemingly at random sometimes with the same (GUI) application being launched, more so it seems with applications that are WinForms or WPF apps. If I could duplicate the problem I would, but it's simply too arbitrary.

  125. Ivo says:

    Is it legal to use NULL for the icon parameters of IExtractIcon::Extract? The documentation hints that it is – "This parameter may be NULL". But I've seen at least 2 cases when it doesn't work:

    1) When getting icons from the C:WindowsAssembly folder, Extract just crashes in shfusion.dll

    2) When getting icons from the Games folder (FOLDERID_Games), Extract returns E_INVALIDARG

    And actually, is there any performance benefit of getting just the small or just the large icon, or is it almost as quick to always get both?

  126. WndSks says:

    @Leo Davidson (I'll quote myself for a change) "The callers size should never be larger than the OS size" while it is true that some functions validate arguments with >= ossize, there are lots of examples where it (mistakenly IMHO) uses == (This was probably a bigger problem back in the 9x/NT4 vs NT5 days)

    "you need to code to your minimum supported OS version…" This part is always true, even if all checks used >= you would still need to know which OS you are running on since you can't access somestruct.MemberAddedInVista on XP etc.

  127. Leo Davidson says:

    @WndSks:

    "@Leo Davidson: The callers size should never be larger than the OS size, you need to code to your minimum supported OS version and dynamically adapt at runtime if you need newer features"

    That *isn't* true in general. If it was true for all (or even most) structure arguments with size members then our programs would break all over the place on older OS whenever we upgraded to newer SDKs, which doesn't happen (in general).

    The API I brought up is interesting because it is one of the few cases where that *does* (or at least can) happen.

  128. Vilx- says:

    Since history and Windows UI are your favorites, it'd be interesting to hear more about Windows and skinning. Possible topics include:

    * Possibilities for making custom skins for Vista/7 (possibly with Areo capabilities);

    * The reasons for prohibiting 3rd party skins on Windows XP (with the signature check in uxtheme.dll and not providing any APIs/tools) yet not creating more skins of their own;

    * Your personal view on people reverse-engineering the whole thing, patching uxtheme.dll, creating tools, and making a huge amount of custom skins for Windows XP;

    * Your personal view on the possibility for 3rd parties to create skins for Windows.

  129. Justus says:

    Why does the logon screen after stand-by or suspend still save your password if you entered it befor stand-by or suspend ? (Works at least in XP and Vista)

  130. kinokijuf says:

    @Justus: because the logonui.exe process (or whatever you chose for logon host doesnt close. (btw the „A:-)Brunuś” post was mine)

  131. kinokijuf says:

    @Justus: because the logonui.exe process (or whatever you chose for logon host) doesnt close. (btw the „A:-)Brunuś” post was mine)

  132. Alasdair King says:

    Why are there all of "Text Document" and "Text Document – MS-DOS Format" and "Unicode Text Document" Save As formats in WordPad (on Vista)? Isn't at least one redundant?

  133. Amnesia says:

    On a dual monitor, exiting from the lock screen, why some programs (like notepad) are replaced to being totally visible in one monitor and others not ? (when you locked the computer the window app was on both monitor)

  134. Alex Cohn says:

    My program uses Network Connections shell folder to find and programmatically enable a wireless connection. I can use InvokeCommand() with verb=16 or "enable". Is there some way, other than trial and failure, to find this verb?

  135. Ian Boyd says:

    The edit delay in Windows Explorer. Is it 500ms? Why 500ms and not 1 second, or 20ms? Is it a property that comes from the ListView common control? Is it a customizable preference in Windows? Through my testing it does not appear linked to configurable double-click timeout.

  136. Roni says:

    Suggestion 1: What about how Explorer handles documents being renamed? I have noticed that (at least in Windows 7) Explorer keeps track of renamed / moved recent documents, so opening a shortcut to a renamed file actually updates the shortcut's destination and opens the renamed file. How is this done? Is it an NTFS feature?

    Suggestion 2: It would be nice to know about the history of multi-monitor configuration support in Windows, for example, since when it is supported, were there any limits (monitors of the same resolution maybe?) and so on.

  137. Busiturtle says:

    Could you provide some history on Window Media Center Edition (MCE)? Why did MCE get rolled out as a unique platform? Could it not have been sold as an application or service pack instead of a dedicated OS?

    Second, has there ever been a more painful user interface than the Set Top Box configuration wizard in MCE? The wizard demands the user have the infrared receiver extender AND infrared blaster AND the Media Center remote before MCE will display video from the S-Video or Composite Video inputs. Many MCE users have expressed great frustration about this design (you can google it). What makes the Wizard design completely baffling is that after forcing the user to provide these components the Wizard does a lame job of actually ensuring the remote control function actually works. Would it not have made a better user experience to separate the selection of the video input from the configuration of the remote control?

  138. James says:

    I was wondering why many windows APIs kept DWORD for the length for parameters instead of upgrading to SIZE_T (or DWORD_PTR).  For example CompareStrings[Ex].

    Is there some historic reason here or is it just a design bug?

  139. alv says:
    • Why does the IsDialogMessage function have to be called inside the message loop? It seems to me that all its activity could take place inside the window procedure of the modeless dialog itself when it has focus, just as if it were a modal dialog; and when it doesn't have focus, it should't be called for the dialog anyway. Is it my limited understanding, or does it have some historical reason? (There has been a post about TranslateAccelerator earlier where it was nicely explained why that one has to reside in the message loop, but in my understanding those reasons don't apply to IsDialogMessage).

    • I understand that the AltGr key is only a shortcut for Ctrl+Alt. However, many programs which are unaware of the fact that using a non-English keyboard layout, many characters can only be typed using AltGr, and therefore they define several keyboard shortcuts with Ctrl+Alt modifiers, making it impossible to type several characters. My opinion is that it would be good idea to implement keyboard handling in a way that when such a key combination is pressed, it should never be interpreted as a shortcut, but only as the character being typed. Is this even possible in a global manner? If it is, I think it would be a better solution (I'm trying the cancel the 'Because the alternative is worse' argument here) because functionality available through shortcut keys is almost always available through other means (like as a menu item), but being unable to type specific characters in legacy applications one has to use without any chance of getting them fixed is extremely annoying.

  140. Chris Hill says:

    Discuss the use of Structured Exception Handling (SEH) by the implementation of the Windows user interface functions such as those in user32, particularly those which call application code.  Explain implications for applications that might generate typically fatal exceptions like access violations while being called by a system function such as TranslateAccelerator.

Comments are closed.