Suggestion box


Post suggestions for future topics here instead of posting off-topic comments. Note that the suggestion box is emptied and read periodically so don't be surprised if your suggestion vanishes. (Note also that I am under no obligation to accept any suggestion.)

Topics I are more 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 send feedback about .Text to its author, Scott Watermasysk.
  • Internet Explorer. You can try IE folks like Tony Schreiner, jeffdav, and Dave Massy.
  • Visual Studio.  You can try one of the Visual Studio blogs.
  • Non-software Microsoft topics, such as product support policies, marketing tactics, and hiring policy.
  • 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.)
  • Legal issues.
  • Predictions for the future. (What's the title of this blog again?)
Comments (142)
  1. David Candy says:

    Raymond,

    What is %1 (in verb commands) mean exactly and has it been the same across all ver 4 & 5 windows.

    I thought I read once, a long time ago, that it gives 16 bit progs short names and 32 bit long names. But this does not seem to be the case (unless regedit is a 16 bit program). I’ve also read that it is only the shortname (when 95 came out) but then enclosing it in "" would be pointless.

  2. Anonymous Coward says:

    I have never turned off a status bar in any Explorer window ever. In fact I regularly turn them on. How come Explorer windows regularly appear without status bars?

  3. Anonymous Coward says:

    I would like to hear your opinion of the programming languages you have used, and where you think things are going for the work you do.

    Note that I couldn’t care less what other people think/experience, and I don’t care about what is going to happen to other people. I am curious about your opinions and what you think will happen in the work you do.

  4. A Regular Viewer says:

    While I understand that System Control Panels are off limits for normal users on Windows XP, why is the date/time control not an exception? Double clicking the time in the system tray pops an error message, as it should. But then how does a normal user access the calendar?

  5. KiwiBlue says:

    I have a custom control which allows users to open the popup part and select something. I needed to handle WM_NCACTIVATE in mainframe window to avoid color changes on the titlebar when popup is visible. You’ve mentioned once in your comments that this is not the right way to handle this. What’s the proper method?

  6. Michael says:

    How is Microsoft working to eliminate the CRT-based 96dpi default setting in future versions of Windows? Many Windows dialogs cannot cope when you adjust your DPI setting to the natural resolution of your LCD screen (120+ DPI).

  7. Scott says:

    I like to use windows shortcut key combos, CTRL+ALT+W to open up Word, for example. Why does running MS Money make these shortcuts slow down to a crawl? It took me a long time to make this connection, but for (at least) the past several versions of Windows (98SE, 2K, XP), if I’m running MS Money, it usually takes forever (or 5 to 10 seconds, same thing) to launch other programs via the shortcut combos. What ungodly strange interaction could be occurring?

  8. Joel Spolsky says:

    How should I store a user’s credentials (username/password for a web site or ftp site) securely?

  9. Joel Spolsky says:

    Can you explain once and for all the difference between "parent" and "owner" windows? It confuses the heck out of me.

  10. Joel Spolsky says:

    Every once in a while we consider using Terminal Services so that nobody has to have any state on their own PCs. But we like to use 2 really big screen monitors each, and Terminal Services sessions won’t span more than 1 monitor. Any workarounds or suggestions?

  11. Joel Spolsky says:

    The other thing we consider is keeping "home drives" on a network share. But the last time I tried that, compilation times increased dramatically. Do Microsofties keep their checkouts on their own hard drive, or do you have a home directory on a server?

  12. Joel Spolsky says:

    Sometimes when we query the SID of a computer we get back a blank SID. And sometimes different threads running under IIS give back different SIDs. This started happening in Win2003 and WinXP.

  13. asdf says:

    Can you talk about the shell namespace and interesting things you can do with it like you said you were going to:

    http://blogs.msdn.com/oldnewthing/archive/2003/12/15/43687.aspx

  14. Mike Hearn says:

    So, I’m wondering who to go to talk about COM marshalling stuff. Preferably somebody with guru like knowledge who still actually works on it and is interested in it (ie not don box). Any ideas?

  15. Andy says:

    I absolutely love the history posts. Pretty much the history of anything in Windows IE how "X" thing got started, who thought it up, how it migrated through the windows OS’s, etc. I would love to hear more of this type of thing. A bit more history of the personas behind things too would be great.

  16. Why does Windows XP prevent changing the images in the start menu? In Windows 2000 you could do this by setting a registry key. Also, why does it insist on restoring "My Computer" when I’ve renamed it to something else. Also the Recycle Bin, which is difficult enough to rename to being with. And the icons, when I change them.

    Why can’t I get rid of the top-level "John’s Documents" and "Shared documents" shell entries? Why can’t I change the app used to view source in IE under Windows 2000? Why doesn’t IE and Explorer remember that I want a darn status bar? Why does Explorer insist on turning on thumbnail view on folders that I’ve set to details only? Why can’t I turn off zip folder view for good? Why does it keep coming back?

    I’ll think of more. That should keep you busy for a while =)

    Seriously though, my point is Windows XP is really annoying in many ways. I’m seriously thinking of going back to W2K.

  17. James Summerlin says:

    Why is it so hard to make Windows Messenger go away? You can check "don’t allow this program to run in the background" and uncheck "run this program when windows starts" yet when I reboot my computer, windows messenger is in the background running and people can pm me. The only way to truly make Windows messenger go away is to set a local group policy, which is a pain for non-technical users. Any workarounds or ideas?

  18. James Summerlin says:

    Visual Studio .Net 2003 Professional comes with some really cool stuff. What, in your opinion, is the strengths and weaknesses of the difference programming languages included thereof?

  19. James Summerlin says:

    We all hear about some of the problems MS has with its code (i.e. when the latest security patch is released). Does anyone ever get fired for making a mistake that costs everyone a lot of time and money? For example, the flaw that allowed blaster to run amok?

  20. David Candy says:

    Klaus H. Probst

    Many of your questions have solutions in Raymond’s Tweakui.

    http://www.microsoft.com/windowsxp/pro/downloads/powertoys.asp

    NVidia drivers are changing My Computer name.

    Start menu icons are here and the next 6 entries

    HKEY_CLASSES_ROOTCLSID{25585dc7-4da0-438d-ad04-e42c8d2d64b9}

    Regsvr32 /u zipfldr uninstalls the zip utility. Depending on what other commands there are being inheirited dbl clicking can still open a zip. Delete the file if it annoys you that much.

    Use Tools – Folder Options – View – Apply to All Folders for status bar and icon layout.

    These are all well known answers in the news://msnews.microsoft.com/microsoft.public.windowsxp.customize groups.

  21. Brandon A. says:

    What about the history of Ctrl+Z? You mentioned you were working on that a few months back, and I haven’t seen anything since. Did I miss it, or is it still in the pipeline?

  22. David Candy says:

    Links no work for news://

  23. David Candy,

    Thanks for those. I can’t believe the video driver is changing that… weird. The statusbar thing does not work with the "Apply to all folders" thing. I still get many folder views without a status bar, not to mention IE sometimes comes up without one as well.

    I can’t delete the zip handler DLL, it will be replaced by the protection system.

  24. David Candy says:

    It’s the crap NVidia puts into their drivers these days (roll up windows, transparency etc) Roll back your driver.

    You may need to set the defaults. Maybe raymond might like to detail exactly how all this defaults work but there are lots of defaults. EG doing this in My Comp sets the defaults for all My Comp folders (there”s only one), doing it in a file folder is for all File Folders, plus there are other defailts as well that these override. If it gets confused nuke all the settings.

    Delete these keys or values from the registry. This will reset many things like saved folder settings.

    HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorer and delete the value

    Shellstate

    And these keys

    HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerStreams

    HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerStuckRects2

    HKEY_CURRENT_USERSoftwareMicrosoftWindowsShellNoRoam

    Doing Explorer does IE’s status bar.

    You need to delete from System32, System32/dllcache and make sure the install media path isn’t available (eg the XP CD not in the drive).

  25. Scott says:

    I agree with Andy – history posts are great. I particularly enjoyed reading about all of the efforts to maintain backwards compatibility. (And I hope MS keeps it up – I was a little discouraged by Joel Spolsky’s comments about the future of that. I want the stuff that I have to keep working!)

  26. Raymond Chen says:

    Brandon: You missed it. google for <ctrl+z oldnewthing>

  27. bryan says:

    a second on the shell namespaces suggestion.

  28. Macneil says:

    I too would like to know why IE flakes out and doesn’t show the status bar. It has something to do with using ctrl-N to make new windows or something.

  29. Zero-Brain says:

    What is the meaning of life?

    *SCNR*

  30. Alan says:

    What’s with that taskbar bug where you click the button for one window and another pops up right before it does? A friend of mine told me that you said it wasn’t a bug somewhere on here, but I wasn’t able to find the entry for it, so I’m guessing he was thinking of something else.

  31. Dworkin says:

    How about explaining why in W95 you could use the little map to choose your region but in the later Windows even though it displays the map you have to use the drop down menu and the map does not animate? I’ve always wondered why that changed – perhaps you know?

  32. Dworkin says:

    James Summerlin, you can always entirely remove Messenger with the command,

    Rundll32 advpack.dll,LaunchINFSection %windir%INFmsmsgs.inf,BLC.Remove

    (all on one line of course.)

  33. Len says:

    At one point with tab controls it was documented to let you set the color of the tab. Yet that was missing when 95 came out. It eventually disappeared totaly from the docs and SDKs. Now for my questions. Why was it removed? Was it ever even there?

  34. Norman Diamond says:

    This is a repeat, but you are correct that it belongs in the suggestion box instead of where I previously posted it.

    Please stop complaining about people who blame Microsoft when a new version of Windows or new service pack or hotfix breaks applications.

    Sure a few users are victims of other companies’ applications or drivers, but they are not normal users, just as we programmers are not normal users.

    A majority are victims of Microsoft applications and Microsoft drivers, and we are right to blame Microsoft. An even larger majority are victims of Windows itself because Internet Explorer is built into the OS, and we are right to blame Microsoft.

  35. Norman Diamond says:

    A Japanese version of Tweak UI is at http://www3.zero.ad.jp/suto/ptoyxp.htm

    I haven’t tried it since I already installed the English language version and it has been enough for me.

    TweakUI was said to work only when regional settings are set to US English, and later was said to work with any native regional settings though its own messages would only be displayed in English. My understanding is that the Japanese version displays its messages in Japanese, but I don’t know if it has any dependency on regional settings.

  36. Norman Diamond says:

    Someone else asked why Windows Explorer often stops displaying its Status bar. There are two answers to this.

    In versions of Windows Explorer that have relatively few bugs, sometimes the Status bar wasn’t displayed by default. A menu entry could be clicked to add the status bar for displays of that particular folder. But to make the present display settings apply to all folders, it was necessary to go into Tools – Options and click a button somewhere there.

    In versions of Windows Explorer that have relatively more bugs, the answer is just random. For example in Windows XP, make settings that are useful for abnormal people such as programmers, with the view set to detailed instead of icons, and then go to Tools – Options and click a button to apply the view to all folders. After a random length of time, Windows Explorer will suddenly decide to display some folder with an icon view or maybe with a thumbprint view (if there happens to be a .bmp or .jpg or anything in the directory). One might almost think the length of time is random enough to use for cryptography or other applications that need truly random seeding, but if one doesn’t want to wait a few hours or a few days then one still has to find a different solution for those.

  37. asdf says:

    I’d hate to be off topic here but to answer Joel’s question: http://www.kkow.net/etep/docs/parent_owner.html

  38. Johan Thelin says:

    The command line has changed over the years. From DOS when it was the interface, to Windows NT 4 where it lacked much of its former glory. Now, for Windows 2000 and XP it seems to be comming back. How has it evolved, why and will it ever become as capable as, for example, BASH?

  39. Almost Anonymous says:

    So many people have commented on the Explorer not remembering your folder settings that I just have to jump in as well!

    I want detail view for pretty much all my folders. I leave the control panel with icon view and that’s about it. I’ve set my view correctly and done the "Apply to All folders" and yet I still occasionally get folders with icon view! I think I remember it being less of a problem with Windows 98 than W2k or XP.

    I’d like to know why, after all this time, this feature still doesn’t work right? Certainly, Windows cannot forever and ever remember settings for every folder, but perhaps it could be smart and randomly return to icon view

  40. Space Wanderer says:

    Why are we created only to suffer and die?

  41. Anon says:

    Any chance on some info on how Win32 might evolve in the next version of Windows (Longhorn)?

    A couple of questions on the same topic

    – What things do you wish had been added to Win32 that never were?

    – What one thing do you believe should never have been added to Win32?

    :)

  42. Craig Ward says:

    If I open a dialog within an application (ie: the About box) and then use ALT+TAB to cycle through the running applications, the task list uses the dialog’s caption (ie: "About") as opposed to the application’s main window caption.

    I’ve always found this behaviour odd. Why doesn’t the list use the same caption as what Task Manager uses as a task’s caption?

  43. Jul says:

    Why do you make it so hard to properly create a replacement shell?

  44. dhiren says:

    Hey Raymond,

    One thing I’ve been wondering forever is the reasoning behind making explorer.exe the jack-of-all-trades – it controls the desktop, the taskbar, the file browser, the internet browser…

    Why wasnt there a desktop.exe, taskbar.exe, etc?

    -d

  45. David Candy says:

    Almost Anon

    You have to do Apply To All while in a file folder.

    For each type of object (File Folder, Control Panel, My Computer, etc) that you do an Apply to All in it’s clsid and the settings are created/updated at

    HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerStreamsDefaults

    as well as a higher set (I presume I don’t know) of defaults at

    HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerStreams

    Settings=

    Plus if you hold down control and click close it also updates

    HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorer

    Shellstate=

    typedef struct {

    BOOL fShowAllObjects:1;

    BOOL fShowExtensions:1;

    BOOL fNoConfirmRecycle:1;

    BOOL fShowSysFiles:1;

    BOOL fShowCompColor:1;

    BOOL fDoubleClickInWebView:1;

    BOOL fDesktopHTML:1;

    BOOL fWin95Classic:1;

    BOOL fDontPrettyPath:1;

    BOOL fShowAttribCol:1;

    BOOL fMapNetDrvBtn:1;

    BOOL fShowInfoTip:1;

    BOOL fHideIcons:1;

    BOOL fWebView:1;

    BOOL fFilter:1;

    BOOL fShowSuperHidden:1;

    BOOL fNoNetCrawling:1;

    DWORD dwWin95Unused;

    UINT uWin95Unused;

    LONG lParamSort;

    int iSortDirection;

    UINT version;

    UINT uNotUsed;

    BOOL fSepProcess:1;

    BOOL fStartPanelOn:1;

    BOOL fShowStartPage:1;

    UINT fSpareFlags:13;

    } SHELLSTATE, *LPSHSHELLSTATE;

    Shellstate is defined in the SDK somewhere as a structure. Basically sorting is the thing stored there.

    See SHGetViewStatePropertyBag which give a general idea of what is happening.

    Then there is the Remember Folder Settings option and No Save Settings.

    Using either of the above (Apply To All or Rem Folder Setting) mine NEVER change.

    But as MS makes this virtually not understandable many, many, poeople have problems with it. But it’s so simple if you spend 5 years working out how to predict it’s behaviour.

  46. Jonathan says:

    I’ve always been curious about how the various IE/shell DLLs (starting with IE 3.0) got to have the version number NT 4.7x. I remember that IE 1/2 had the version number 4.40 (as with everything else in the Windows 95 Plus pack). I was pleased when IE 5.0 and NT 5.0 "caught up" and had the same version numbers; however IE 5.5 broke away again and actually had version number 5.50. (I’m thinking this is because the cancelled Neptune project was NT 5.50, and IE 5.5 was developed as part of this and then lived on after Neptune’s cancellation). Today, IE has version 6.0 and comes with NT 5.1, and current preview versions of Longhorn (NT 6.0) have IE version 6.05 (or 6.5). Its too bad these weren’t kept in sync ;-)

  47. Sam [xMS] says:

    Johan, for the future of the command line on windows, check out <A href="http://www.google.com/search?hl=en&ie=UTF-8&q=microsoft+monad">monad</A&gt;.

  48. JF says:

    History history history. The sections I enjoy the most are certainally the ones which explain strange bits of windows and the reasons behind choices made a Microsoft. It is nice to be able to peek behind the veil.

  49. Would you be able to comment on the difference between

    GetStockObject(SYSTEM_FONT), GetStockObject(DEFAULT_GUI_FONT) and

    NONCLIENTMETRICS::lfMenuFont returned from

    SystemParametersInfo(SPI_GETNONCLIENTMETRICS) with regard to the font

    used in menus?

    The documentation for GetStockObject in the SYSTEM_FONT section says "By

    default, the system uses the system font to draw menus" and for

    DEFAULT_GUI_FONT it says "Default font for user interface objects such

    as menus and dialog boxes". Menus actually appear to be drawn in

    NONCLIENTMETRICS::lfMenuFont (at least they do on XP with themes turned

    off).

    I guess my questions are (a) what font does Windows use for menus (b)

    what are the other fonts returned by GetStockObject for (c) why is this

    API so odd (d) can the user change the font used in menus?

    I have solved my particular problem in this area but I was wondering if

    you could be tempted into writing something about these default fonts in

    general.

  50. Scott says:

    What settings is Windows 2k saving when it says it’s saving your settings at shutdown/logoff? Isn’t everything saved already?

  51. Michael says:

    Am I wrong, or file manager in DOS 4.0 had two panels like Norton Commander? Why Microsoft did not use this great "source – target" two-panel paradigm later in Windows File Manager and now in Windows Explorer?

    Quite frankly, the only reason I occasionally use Explorer in my Win2K is because of thumbnail image preview. All file-oriented tasks take a lot of time and pain, I have to open two Explorer windows, I need to align them, and I have either to copy-paste files or to drag them… File information is rounded to kB (why the hell?), I cannot overwrite read-only file even if I want to do so (NC allowed to do that, was very convenient), I cannot conveniently compare directories. And keyboard support in Explorer simply sucks, which is quite unusual, MS usually is quite good with keyboard support. I like using keyboard. Norton Commander / Windows Commander / Midnight Commander et cetera are so much more convenient.

    Please, consider including "source-target" view in future versions of Explorer. This is much more important, than fancy but useless see-through 3D flying and rotating windows.

  52. KJK::Hyperion says:

    Why are mutexes internally known in Windows NT as "mutants"? who coined that term? (I have a theory it was Cutler himself – it’s his kind of humor)

  53. Eric TF Bat says:

    Michael –

    A trick I discovered recently, thanks to a bodgy KVM switch:

    If you open two copies of a program such as Explorer, then Ctrl-click on their taskbar buttons, you can select both at once. Then you right-click on one of the buttons and choose "Tile Horizontally" or "Tile Vertically". This saves you the angst of having to manually align the windows so you can drag and drop between them. Not as good as File Manager, but good enough.

    And how did a bodgy KVM switch help me find this? Cos one day I was using it and suddenly the task bar started "misbehaving" in the way I describe above, multi-selecting each button I clicked. The real reason, I eventually realised, was that the KVM switch had convinced itself that I was holding down the Ctrl key. Tapping the Ctrl key cleared the problem, and not long afterward I trashed the KVM and used a better one.

  54. Eric TF Bat says:

    Incidentally Raymond – I’d love to know if you can suggest where I can download legacy versions of Internet Explorer. If it’s on MSDN or the Microsoft website, it’s beyond my meagre abilities to find. I want to make sure the websites I’ve developed will work (ie: degrade gracefully) in as many old browsers as I can find. Netscape still has its archives, but it seems their Loyal Opposition does not. Can you suggest a path toward a solution?

  55. Eric TF Bat says:

    My god! Raymond, you’re like the patron saint of Clue! Bare SECONDS after I asked my last question, the perfect Google query just POPPED into my head! I found http://browsers.evolt.org/, which appears to have everything I need!

    Behold the glory that is Raymond: he doesn’t even need to read the question for the answer to just magically appear! Woot!

  56. Almost Anonymous says:

    "click on their taskbar buttons, you can select both at once"

    Holy crap! Am I the only one who didn’t know you could do this?!?

  57. Michael says:

    Got another one. Is there any way to shutdown USB device using keyboard instead of clicking on notification icon?

  58. Partially anonymous says:

    >click on their taskbar buttons, you can select both at once"

    >Holy crap! Am I the only one who didn’t know you could do this?!?

    There is at least one more person who didnt this.

  59. rr says:

    [OT] Wow is this thread ever popular!

    Would it be too far of topic for you to comment on why the IDE with for the C++ compiler (.NET edition) has changed so drastically from version 6.0 (or even 5.0 for that matter)?

    Or is this already sort of answered by Joel’s interesting article on the API war? (http://www.joelonsoftware.com/articles/APIWar.html).

    rr

  60. Seth McCarus says:

    My question is why custom draw never works for list-views I create on dialogs (DialogBox, CreateDialog, etc.) but works fine (using the same code) for list-views on regular windows (RegisterClass followed by CreateWindowEx). I get the CDDS_PREPAINT message, then return CDRF_NOTIFYITEMDRAW, but never receive the CDDS_ITEMPREPAINT message.

  61. Mat Hall says:

    [Moved from http://weblogs.asp.net/oldnewthing/archive/2004/06/29/168720.aspx to suggestion box. -Raymond]

    Totally OT, but it didn’t really belong in the suggestion box…

    Raymond, what are your feelings on TweakUI possibly coming under fire under the DMCA, as it can be used to &quot;circumvent&quot; &quot;copy protection&quot;? (I use both terms loosely, but the DMCA is totally boneheaded so probably applies.) Are you currently hding in a bunker armed with highly paid lawyers?

    To be precise, using TweakUI to disable autorun on CDs renders SunnCom’s MediaMax powerless, and if you recall they wanted to sue a Princeton student for saying "hold down Shift" — http://news.com.com/2100-1027-5089448.html — so I wouldn’t be at all surprised if they tried to get TweakUI and any links pertaining to it, the Shift key, and HKLMSYSTEMCurrentControlSetServicesCdromAutoRun blasted from the face of the earth… (And really, taken to its (il)logical extreme, PCs in general are probably unlwaful.)

    God bless America, or something. :)

  62. Decker says:

    If I recall correctly, in Windows-NT 4, the file-extension of .URL files were always hidden, even if you set the File-Explorer properties to ‘always show file-extension’.

    This had me always annoyed, since I used an application that used the .URL file-extension for ‘Universal Resource Library’ files, and not as ‘Uniform Resource Locator’ nor ‘Internet Shortcut’.

    Why was the .URL file-extension (and I imagine others too) excluded from this ‘always show file-extension’? Were there a particular reason to do this?

    BTW: Thanks for this great blog. I learn something useful about MS-Windows every time.

  63. MilesArcher says:

    Why knitting and Germanic languages? Any other odd interests?

  64. David Candy says:

    Michael

    Press Ctrl + Tab, Escape, then tab to notification area, then use arrow keys to the icon, then shift + F10 for the context menu.

  65. KJK::Hyperion says:

    Not really a suggestion, more a clarification. I quote from the comments to http://blogs.msdn.com/oldnewthing/archive/2003/12/29/46371.aspx :

    Oleksiy Kolisnychenko says:

    > Raymond, why WH_SHELL doesn’t send anything when console window become active? How to handle this situation?

    Raymond replies:

    > It doesn’t? I didn’t know that. It should – you see the taskbar buttons pushing and unpushing when you move focus to/from a console window, after all.

    I feel a bit nervous about teaching stuff to Raymond, but here it goes: the taskbar doesn’t use WH_SHELL. The taskbar registers itself as the shell window, and instead of a cumbersome in-process hook, it receives shell events through the "SHELLHOOK" window message. Look in the PSDK for RegisterShellHookWindow. Incidentally, it’s a function that was originally undocumented, and Microsoft was forced to document it because there’s no other way to implement a full Explorer replacement (see below for details). See also SwitchToThisWindow if you ever wondered how can Alt-Tab and the taskbar unconditionally set the active window bypassing the normal restrictions (and for the love of God DON’T USE THAT FUNCTION unless your program is an Explorer replacement!)

    The reason you don’t receive WH_SHELL notifications for console windows is that console windows run in the CSRSS system process. In general, you can only install in-process hooks in processes you own – processes spawned by runas will evade hooks as well – and I think it’s obvious why. The most interesting hooks (shell, keyboard and mouse) have an out-of-process variant in the NT family, luckily

  66. NCW says:

    Any idea where real documentation can be found for the objects and interfaces used with event sinks for the SMTP service in IIS?

    Apart from some basics, MSDN is next to useless. It documents interfaces that sound really useful without telling which objects inherit them or how they are made available.

    Someone within Microsoft must know how these things work.

  67. Alex says:

    A few questions:

    (1) Why is it that delete temporary internet files (from I.E.) actually fails to clean up the files found in content.ie5 the folders have names like abc123fg.

    Last night I deltree’d these hidden folders and cleaned up over 1Gb of drive space

    (2) why are the index.dat files not deleted (o at least purged when you do a clear history or a remove temporary internet files?

    (3) On WinME machines I’ve observed a number of zero byte length files appearing in the Windows directory. Their names resemble GUID fffcc7fd_{721C2BB2-9673-405A-ADB1-DF93D9A1A854}.tmp

    There can be hundreds of these files. Deleting them seems to do no harm.

    (4) On a WinME machine, two Windows directories appear when I view my C drive using either explorer or do a dir at the command line. The two directories are identical. Doing a dir/s or scanning files will have it go through both directories. Windows doesn’t seem to think anything is wrong. Is there anyway to fix this (short of reformatting and reinstalling Windows)? I think this came about because my wife got into the habit of pressing the power button to shut down the computer (she had Restart as her shutdoen option, so whenever she shutdown the computer would restart and she would power down. sigh).

    Alex

  68. With the ease of configuration tools that are generally inherent in Windows, why are there no tools (to my knowledge) for managing the special user profiles of Windows. Those would be the Default User profile and the All Users profile. There are many times I want to modify my Start Menu (since so many companies can’t keep from making company specific folders) and cannot easily do so.

  69. Michael says:

    Eric, thanks for Ctrl+click tip, did not know about it. Works nice, but I still prefer my Windows Commander… oops, sorry, my Total Commander ;)

    David, do you suggest to navigate to the same icon using keyboard? All this hassle? Thanks, but no :) I’d prefer some Win+smth combination or at least an easy way to do it through Control Panel.

  70. Goplat says:

    I’ve noticed that while some PE executables have the PE header right after the DOS stub, most have some other stuff between them. For example

    FA0C84C4BE6DEA97BE6DEA97BE6DEA97

    C571E697BA6DEA973D71E497BC6DEA97

    5672EE97BD6DEA97BE6DEB97926DEA97

    5672E097AA6DEA9752696368BE6DEA97

    after that were 8 null bytes and then the PE header. It’s not always the same size, but 4 bytes from the end there’s always 52 69 63 68 or "Rich". Microsoft’s PE/COFF spec doesn’t mention this stuff, and zeroing it out has no visible effect… I’d be interested to see what it is.

  71. Fred says:

    A few others have mentioned doing this, so I can see I’m not alone. I like to make use of the keyboard shortcut field in, uh, shortcuts. For example, ctrl-alt-b for my browser, or ctrl-alt-p for photoshop. Why does this only work for Start Menu shortcuts, and is there some kind of limit (I first noticed in XP, these shortcut keys will randomly stop working – ctrl-alt-p will be fine, but ctrl-alt-b inexplicably fails until I reboot. Restarting explorer does not fix the problem). Any ideas?

  72. Fred says:

    I know this is "not actually a .net log", but I have noticed when writing C# apps that you need to add components in ‘reverse’ order for docking to work. For example, if you have a text control on ‘fill’ docking, and a tree on ‘left’ docking, you MUST add the text control to the form’s control collection first, or the docking will not work the way you expect. Is there a reason for this, and does it stem from older versions of the GUI? (Chances are I would know the answer if I’d ever done serious C/C++ Win32 programming, but I haven’t…)

  73. Fred says:

    Err… by ‘any ideas’ I really meant ‘any insights’… I’m not asking for support :)

  74. Raymond Chen says:

    Fred, I know nothing about UI programming in anything other than Win32. "Component", "docking", "text control", "fill docking" – none of those words mean anything to me. They may as well be nonsense words.

  75. Fred says:

    Sorry to spam your suggestion box (I’ve spent the last few days reading through your archive, and it prompted a list of questions in my head that I wish I’d written down). Thanks for a very interesting read!

    Why doesn’t explorer’s sorting work properly on some network drives? When I view files on my hard drive, it’s sorted alphabetically with folders at the top, each and every time. When I view one particular network drive, files and folders are mingled (sorted strictly alphabetically, so random.txt appears above SillyFolder), and if I sort by ‘file type’ I still get some folders separated from others by small clusters of files! This only happens on one partition with files copied from an old Novell server (the server is Win2k).

  76. David Candy says:

    Michael

    I’m not saying this is how it should be, only this is the standard way.

  77. Ziad says:

    Hi Raymond,

    what is the story behind the localization of ‘Program Files’ and ‘Start Menu’ directories ?

    In the french version of windows, ‘Program Files’ is in english, wheras ‘Start Menu’ is ‘Menu in Démarrer’ (and ‘Desktop’ is ‘Bureau’)

    In the german version, if I am correct, everything is localized and ‘Program Files’ is ‘Programme’

    Was there a reason for this ?

  78. David Kafrissen says:

    Today I run Windows Update and it finds a critical update that removes unacceptable symbols from the Bookshelf Symbol 7 font.

    Microsoft Knowledge Base Article – 833407

    Does this mean someone complained about these symbols because they thought they meant something they weren’t?

    Thanks in advance,

    Dave

  79. Carlos says:

    It’s not enough for a whole topic but…

    Do you know where the widely used term "applet" comes from? It seems to originate at MS – the earliest reference I can find is to the Control Panel in Windows 3.0.

  80. Anonymous says:

    Why does XP themes require a service? Why is it disabled by default on 2003 server, and why, even when you enable it – it does not work from a TS session other than the console?

  81. okely dokely says:

    how about a short series that creates a shell namespace extension, using the newer apis that are avaiable but don’t have any help documentation – FolderItemsFDF? -IShellFolderViewCB ? – IShellView ?

  82. Keith Moore [exmsft] says:

    Mark Russinovich recently posted an article (http://www.winnetmag.com/Windows/Article/ArticleID/41095/41095.html) entitled "The Memory-Optimization Hoax". He describes how NT memory optimizers appear to "work", and why they don’t really do anything useful at all.

    I remember a certain someone writing a similarly detailed account of a certain Win95 "optimizer", way back in the Win95 days. Is there any chance that could be published here?

  83. Dru Nelson says:

    How does IE draw controls that aren’t

    child windows? (For example, a button

    on a form).

    Is IE re-using the code from somewhere or have they completely re-implemented all controls.

  84. Dru Nelson says:

    Why doesn’t the Office/Visual Studio team release the code for their neato UI’s. I love their new 2003 taskbars and docking. We only get the Common Controls updates :-)

  85. Carlos says:

    To answer Dru Nelson’s question: IE may draw controls that aren’t child windows using the DrawFrameControl function.

  86. Pehr says:

    A question about the windows networking system that (as far as I know) dates back to at least windows 95:

    Whenever a network card reports "link down" windows destroys all the network connections, instead of doing the logical (reporting a "no route to host" and dropping the package while it waits for the connection to time out). Normally this shouldn’t be any problem, as I very rarely pull out the network cables, but WLAN cards tend to report link down very often, which breaks ssh connections needlessly.

    So, my questions:

    Is there any (good) reason for this state of things? What is the history behind it?

    Is there anyway, beyond writing my own device drivers, to disable this function?

  87. ben says:

    Can you comment on the IXmlSerializable interface in v1.1 of the .net framework, and if the interface will change in the next version, or if it is safe to implement this interface, thanks

  88. Old Hacker says:

    Is there any good reason {whatever part of Windows searches for new drivers} hardly ever finds the CD drive, or whatever directory you’ve already specified 17 times has the drivers? I could understand this in Win95 Alpha, but it’s 9 yrs later now!

    How about when you make some very minor change in TCP/IP settings and Windows reinstalls about 34 .dll files that are already in System32?

    On the other hand, the API’s are pretty decent.

  89. Steve Loughran says:

    Ok, here is my hard core win32 problem.

    How do you make a win32/mfc app resistant to keystroke/keychar interception. That is, defending against hooking of events or detecting it. I havent come across anything in XP SP2 that tightens up the rules, and want to do what I can to defend in depth, by making it harder for malicious code to gain from running on a system.

    I am thinking of this of strenghtening Bruce Schneier’s PasswordSafe app, that is up on sourceforge, but dont think I know all the complications.

    I want to get keystrokes direct from the keyboard (or a terminal services session), and know that nothing is intercepting it. I’m thinking of verifying the winmain address matches that of my app so I haven’t been hooked. But what subclassing goes on for theming? Should I try the DirectInput APIs instead for bonus paranoia, on those situations when it isnt a terminal connection?

  90. Jorge Coelho says:

    Hey Raymond, and I apologize in advance for the long post!

    I’m the developer of NextSTART and WorkShelf at Winstep Software Technologies (http://www.winstep.net). NextSTART is basically a skinnable menu system that can emulate the menu system of any other OS and offers a lot of extra functionality, while WorkShelf is a skinnable tabbed program launcher heavilly inspired by the shelf in the late NeXT OS.

    NextSTART ‘replaces’ the Windows startbar with it’s own version and captures the Windows systray (or tray notification area, if you prefer) into it. The systray is very difficult to handle without replacing Explorer as the shell (which Winstep applications don’t do by design) since there is no API to manipulate it, therefore a lot of ‘tricks’ must be applied in order to make it behave properly.

    One of the nicer tricks is to capture the Windows systray into the NextSTART startbar and render its background transparent (adding a drop shaddow to the icons in the process). For this I must capture an image of the systray into a bitmap in memory and work on it in order to make a ‘mask’ Region, which is then applied to a container form. This must be done whenever there is a change in the systray (i.e.; icons are added or removed from it). Since the systray window does not have a persistent bitmap, I was forced to show the whole window for a brief moment, including the background, in order to capture the contents – this caused an annoying flicker when the background became visible.

    With XP’s new PrintWindow API, the systray window no longer needs to be visible on the screen for me to capture the contents. However, because the container form still has the previous transparent ‘Region’ applied to it (and PrintWindow respects this), I’m forced to temporarilly move the systray out of the container form and onto the desktop. I do this by making the Desktop the parent of the systray with Setparent and moving it outside the visible desktop area with SetWindowPos. I then capture the systray image with PrintWindow, move the systray back into the container with SetParent and re-adjust it’s position with SetWindowPos.

    So far so good. The problem is that, after a while (and that’s the puzzling part, only after a while, like a couple of hours running!), moving the systray back to the container form with SetParent makes the CPU peak to 100% usage for nearly half a second – in other words, every time the systray gets updated, the whole system literally pauses.

    Any idea of what might be causing SetParent to induce such a high CPU usage and how to prevent this from happening?

    Jorge Coelho – jmrc@winstep.net

  91. Norman Diamond says:
    1. 7/1/2004 2:56 AM Ziad

      > what is the story behind the localization

      > of ‘Program Files’ and ‘Start Menu’

      > directories ?

      I second that, with a request for expansion. Why does the MUI muck it up more?

      In Visual Studio Installer (compatible with Visual Studio 6) the developer can specify that a shortcut will be created in the Start menu or in some subfolder of the Start menu, but there is no way to specify the Programs submenu or some subfolder of the Programs submenu. The only socially responsible thing to do is to put the shortcut in some subfolder of the Programs submenu. In order to do so, I had to specify the name of the Programs subfolder of the Start menu, and the name of nested subfolder of the Programs subfolder. Of course the Programs submenu has a localized name, and the Programs subfolder USUALLY has a localized name matching the Programs submenu’s name. But on one machine at one customer, the new subfolder was not visible in the Programs submenu. It turned out that this machine had an MUI interface, the Programs subfolder was named in English on disk but the Programs submenu was displayed with its usual localized name in the Start menu, and the newly created application’s subfolder was not shown because the newly created Programs-localized-name subfolder of the Start menu was completely ignored by the Start menu’s operation. This was in Windows 2000, I don’t know which service pack.

      2. http://msdn.microsoft.com/library/en-us/memory/base/memory_protection.asp

      PAGE_EXECUTE_WRITECOPY: Enables execute, read, and write access to the committed region of image file code pages. The pages are shared read-on-write and copy-on-write.

      I understand copy-on-write. (This technology existed before Microsoft existed.) But what does read-on-write mean?

      Also, in the paragraph describing Copy-on-Write Protection, there are two diagrams. One diagram has half of its arrows pointing the wrong direction. The other diagram seems OK.

  92. Seth McCarus says:

    Well, nevermind my entry regarding list-views and custom draw above. I should have (re)read http://weblogs.asp.net/oldnewthing/archive/2003/11/07/55619.aspx.

  93. Sam [xMS] says:

    The win95 memory optimizer you are likely thinking of is SoftRam, and the very same guy debunked it. (Although it was more of a blatant hoax than the NT optimzers linked to)

    ""Inside SoftRAM 95," by M. Russinovich, B. Cogswell, and A. Schulman, Dr. Dobb’s Journal, August 1996.

    Mark broke the story on SoftRAM 95 (published by Syncronys Softcorp.), the second best selling Windows product of 1995 (behind Windows 95 Upgrade), showing the world it was a fraud. This article goes inside the program to expose its deceit. "

    The canonical site for SoftRam info appears to be archived at ftp://ftp.ora.com/pub/examples/windows/win95.update/softram.html

  94. Marc Wallace says:

    Is there any way to disable the "Type" column in Windows Explorer?

    I’ve managed it on some systems, by making the column one pixel wide, and setting all folders to "like the current one". But it only works sporadically.

    I would prefer a real solution, anyway.

    Thanks, and keep up the good work!

  95. Sam [xMS] says:

    Uhh, does right-clicking on the column header and de-selecting "Type" not work for you?

  96. Why can I not reduce the size of a file when any region of that file is memory mapped? When mapping the first 64KB of a 1GB file, it seems silly to be able to modify the file by appending via WriteFile() it but not being allowed to truncate (SetEndOfFile) that which I just appended.

  97. Manoj Mehta says:

    Why can I not close Cmd windows with Alt+F4?

  98. Jonathan says:

    To Steve Loughran:

    Providing a secure channel between the keyboard and the application is one of the features of the Next-Generation Secure Computing Base (aka Palladium). My guess is that its not feasible to prevent keyboard interception until NGSCB is released.

  99. Johan Johansson says:

    Why aren’t mutexes, or other named objects, shared between users? And why is the "Global"-prefix ignored if you’re not running Terminal Services?

  100. Wes says:

    Are you the Raymond Chen who wrote Simpsons summaries for The Simpson Archive?

    http://www.snpp.com/

    http://www.snpp.com/episodes/7G13.html is where I saw your name.

  101. Mike Dunn says:

    Suggestion for a historical article:

    What’s the story behind the least-used common control of them all, the pager control? What caused it to be replaced so quickly by the rebar chevron?

    Along the same lines, do you know of anyone who uses the filter style of the header control? (HDS_FILTERBAR) Where did the idea for that feature come from?

  102. Why does "Move" from an application’s title bar menu work the way it does? Sometimes I want to get an application back that has wondered off my desktop so I press Alt-Space for the application menu then press the down arrow to select the Move item and then press enter. The bit I don’t understand is why the application window only moves with the mouse once I have pressed an arrow key. Is there something I am missing?

  103. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fontext_5yd0.asp

    says:

    nXStart [in] Specifies the x-coordinate, in logical coordinates, of the reference point that the system uses to align the string.

    nYStart [in] Specifies the y-coordinate, in logical coordinates, of the reference point that the system uses to align the string.

    What are logical coordinates? The only coordinates I can find are: world, page, device, and physical device (client area, desktop, or page of printer paper).

    I’m calling TextOut from VB6SP6. A text file in VB6 specifies the API and that much is OK. TextOut returns 1 but it doesn’t display the text.

    TextOut to 0, 0 did not display the text.

    TextOut to 0, txtTimestamps.Height did not display the text.

    Calling GetClientRect and then TextOut to (myrect.Right 2), (myrect.Bottom 2) did not display the text.

    So I haven’t guessed yet which kind of coordinates are logical coordinates. What are they?

    (Of course the reason for doing this is that I want to change the font before calling TextOut. I have created a font with escapement and such. But until this gets debugged I’m not changing any of the text box’s properties.)

  104. Norman Diamond says:

    Sorry for pasting the intended title

    ‘What are "logical coordinates" as used by TextOut?’

    into the Url box instead of Title box in the above posting. Sorry again for that.

  105. Marc Wallace says:

    Sam [xMS]: Uhm. Yeah. That does work.

    I never tried that, mousephobe that I am. Doh! Thanks…

  106. Anonymous Coward says:

    I’d like to know about why 64 bit Windows abandons the Win16 subsystem. One repeated lesson of your blog is that 16 bit code is still with us, and it seems odd that Microsoft would deviate from this modus operandi now. Or is a 16 bit subsystem going to be added in the future?

    I believe that it has to do with on-chip support for 16 bit code when the OS is in 64 bit mode. Can you enlighten me on the details. Presumably, Windows could use an emulator of some type to get 16 bit code running, and if its slow, who cares on our Gigahertz athlons?

  107. david says:

    Raymond, I think it’d be great if you’d do something like an ask Raymond forum.

    Cheers,

  108. Norman Diamond says:

    Do you know why Explorer itself can’t do this reliably?

    Example 1: As mentioned in another thread, at random times Windows Explorer forgets that it was set to display all folders in detailed view, and it displays a random folder in icon or thumbprint view. The user can click on a different folder which Windows Explorer will probably still display as details, then go to Tools – Folder Options and remind Windows Explorer to display all folders the same way as the current detailed view. Now, when the user does this, Windows Explorer does something so it will remember for a random length of time, AND all currently running Internet Explorer windows reload the pages that they’re currently displaying. Now we all know that Internet Explorer is an integral part of the operating system and Windows Explorer could not exist without it, but still, why does Windows Explorer tell all currently running Internet Explorer windows to reload their pages? Why can’t they figure out that they don’t have folders open? (This can be solved by upgrading from Windows XP to Windows 2000 or Windows NT, but then see example 2.)

    Example 2: One time in Windows 2000, Windows Explorer was unable to display the contents of My Computer because of a network problem or DNS error. It displayed exactly the same text that is so common in Internet Explorer. Now this only happened to me once, but I was not prepared for it and could only respond naturally. My co-workers came over to see why I was laughing so hysterically. This disturbance to my co-workers could have got me fired (which is not an exaggeration by the way). Anyway, why couldn’t Windows Explorer detect that it DID (or should) have a folder open?

  109. Some Guy says:

    Last week I found out that if press "shift" when you click in "no", it means "no to all". That was really usefull, if I’d had known sooner, it would have saved me lots of time keeping the "n" key pressed :p

    It would be cool if you could tell more stuff like this.

  110. Anonymous Coward says:

    How does the status bar in windows explorer works? I mean, how do I make it stay?

    Every time I open some folders (i.e. My Documents), I put the status bar, but when I open it again, it’s gone, and I have to put it again.

  111. Sean says:

    did anyone know that this website (www.microsoft.com) has a secruity hole in it and theres addware and spyware that "live" there and put stuff on your computer…

    a little tip..get a program called ad-aware6.0 trial from http://www.download.com and that will fix it…REMEMBER TO UPDATE

  112. When calling CallNextHookEx, are you required to pass the hook handle returned from SetWindowsHookEx? I’ve heard (but not confirmed) that Spy++ just passes NULL for this value. And 99% of the sample hook code I’ve seen passes NULL as well.

  113. Centaur says:

    How come we have to reboot into Windows 9x/ME if we want a FAT32 partition larger than 32G? Is there a particular historical reason behind it?

    I foresee a question, “Why would you want FAT32 for such a partition?”, and the answer is, because I want to be able to take this HDD out and go to another computer that may have Windows 9x or Linux, and they are not very good with NTFS.

    I also foresee an objection, “If you want FAT32, you will also want to limit your cluster size, so as not to waste too much space on slacks”. The answer is, suppose a typical information unit of ~10 gigabytes in 30 files. Then you want to make all the space on your drive available as one big partition, or else you have partition-induced slacks of ~32G-3*10G=2G per partition, which far beats the cluster slacks.

  114. Jason Geffner says:

    Goplat,

    In response to your question above from 6/30/2004 1:56 PM, you can find your answer here: http://www.woodmann.net/forum/showthread.php?t=5925

  115. neli says:

    Printers have non-printable margins. When I draw something on a ‘printer’ HDC, is the drawing position calculated from the left edge or from the non-printable margin?

  116. My suggestion for the blog is about the listview control.

    Listview controls (like other controls) generate a lot of flickering while they are being resized.

    Because this doesn’t look good I’ve done some googling to find a solution for this problem. The best solution that came up was using a combination of a memory DC, WM_PRINT and BitBlt in the WM_PAINT message handler of the listview.

    Because the Windows File-Explorer also doesn’t show any flickering during resizing I was curious what solution was chosen by the programmers of that program.

    greetings, love your blog,

    Thomas Middelkoop

  117. What’s the history behind Windows version naming? We started out with version numbers; Windows 3.0, Windows NT 4.0, etc. Next came year numbers; Windows 95, Windows 2000, etc. Now we’re onto meaningless marketing terms; Windows ME and Windows XP. Why does Microsoft keep changing this? What naming convention can we expect in the furue?

  118. In the Windows folder on the last few versions of windows is a file named clock.avi which shows an ugly clock video. What is the point of it?

  119. Sean McLeod says:

    Could you explain the reasoning and some of the mechanics behind the memory limits with regards to:

    HKLMCurrentControlSetControlSession ManagerSubSystems

    Windows: "… Windows SharedSection=1024,3072,512 …"

    A KB article also mentions a global limit of 48MB.

    Why the hard limits, why can’t it be dynamic based on the total available memory? Most limits like the number of processes/threads etc. in Windows are only limited by available memory and don’t have hard limits, unlike a number of other OS’s with hard-coded process table sizes etc.

    I have a PC with 1GB of RAM and have run into failures to create menus, windows etc. even though my memory commit limit was only 500MB until I increased the heap sizes in the above registry value.

  120. asdf says:

    Some Guy: What dialogs let you hold the shift key down and click N? That sounds really useful.

    I think starting with Windows 2000 you can press ctrl+C on a standard message box to copy the text. But it also copies the titlebar and button text too. I wish these useful things where documented somewhere.

    Does anybody know the logic behind the numpad keyboard remapping (the thing where you hold down the alt key, type some numbers with the numpad, then let go of the alt key)? It appears if you push ‘0’ first, you can type the number in decimal (it looks like it only works for 0-255 though). I have no clue if it’s possible to generate a unicode character, enter the number in hex, or what the logic behind entering a number without starting with ‘0’ is. I’d love it somebody could fill me in.

  121. bg says:

    whats kernel mode/user mode and why is moving between them a bad idea?

  122. pete.diemert says:

    Raymond,

    So what’s the exact difference between a console app and a windows app? I know that the shell likes to look at a little byte in the PE and start a console for you automatically in the console app case but what I really would like is a "dual" mode app where, if I am launched from a console I will inherit the parent console (i.e. get access to its std handles) or, if I am launched from the desktop, no console is created unless I want to create one myslef. Is such an app possible?

  123. If I have two different programs in different directories not in the path, both called for instance mynotepad.exe, and run first one then the other (while leaving the first one open), will it run both programs or two copies of the first one?

    Suppose I make a program which uses an internal DLL named "mydll.dll". If someone else has the same idea, and a user tries to run both programs at the same time (suppose the dll is in the same directory as the exe and not in the path), will the second one use the wrong dll?

    And if it’s not the case, why the need for a different name? Or did you mean the full path to the file when you said "name"?

  124. If there’s one thing I’ve learned reading this blog it’s that Microsoft goes out of their way to be compatible with old software. As Raymond has said on many occasions, why would a company upgrade to the next version of Windows if their 10 year old DOS program which they rely on no longer works. As such Windows has tons of quirks about it to keep it compatible with older programs.

    Given this, why does it appear to me, and many others, that Microsoft is trying kill C/C++? The writing was on the wall when C# was released. Microsoft is focusing most of their attention on C# and VB. And from what I hear MFC is going to die soon. Why is this? Why is Microsoft so adamant about keeping their corporate customers happy, but they will gladly piss off the developers who write the software that made Windows what it is today?

    Maybe I’m all wrong about this. In fact I would LOVE for you to come back and tell me that Microsoft will continue to support C/C++ long into the future. But it sure looks like Microsoft is trying to kill C++.

  125. Rashmi says:

    Would it possible for you to provide a Search mechanism on this site? I had read an interesting article of yours on "History of Calling Conventions". Googling gives me only the fifth article, and I am not too keen on searching your entire archive manually.

    Of course, this is only a suggestion. As an alternative, you might want to put links in your series to the older articles. Thanks!

    Cheers

    ~Rashmi

  126. D. Jackson says:

    In Win2000, when copying folders that contain system files (like C:Documents and Settingsdjackson), why does Explorer crap out and give up when it cannot copy a file (e.g., NTUSER). Why not continue and then report at the end which files could not be copied?

    Stopping and aborting the copy whenever it hits a file like this makes it extremely painful to upgrade computers. When I get a new machine, I share the drives of the old machine and then dump everything into a working folder on the new machine. However, I have to pick and choose files in directories that have system files. Tedious!

  127. I know you spoke about WM_NCACTIVATE slightly with the following article:

    http://blogs.msdn.com/oldnewthing/archive/2003/10/29/55479.aspx

    However, it is incomplete, and it would be interesting to look into it further.

    It has been brought to my attention that in order to properly draw toolbars with active-looking captions when the main window is active (or to make the main window look active when a toolbar is active) you must ‘hack’ the WM_NCACTIVATE message – that is, use it in ways MSDN would leave you to believe are incorrect. I have been told that several of Microsoft’s products do exactly this, such as Excel. One particular webpage uses an undocumented feature of WM_NCACTIVATE to avoid flickering of captions, and his solution works perfect:

    http://www.catch22.org.uk/tuts/docking1.asp

    Can you comment on whether this is the only solution, and if the Excel team used the same undocumented feature? If the Excel team did, then it would suggest that it is safe to use (i.e. its behaviour will never change in future versions of the API), even though using undocumented features is normally a very bad thing.

    Jason

  128. LarryO’s comment policy

  129. LarryO’s comment policy

Comments are closed.