What’s the deal with the EM_SETHILITE message?

If you look up the documentation on the EM_SETHILITE and EM_GETHILITE messages, they just say "not implemented". What's going on here?

The EM_SETHILITE and EM_GETHILITE messages were added back in 2002 for the breadcrumb bar to use. Back in those days, the breadcrumb bar wasn't what you see in Windows Vista today, a series of buttons with drop-down arrows, each representing a level in the hierarchy. The breadcrumb bar back in those days was just a fancy-looking address bar (i.e., an edit control). Instead of having a button for each level in the hierarchy, the breadcrumb bar would highlight a path component if you moved the mouse over it (or used the keyboard to select it). Instead of having drop-down arrows, the breadcrumb bar would wait for you to hover your mouse and the highlighted path would auto-open to show the menu of sibling items.

The design of the breadcrumb bar changed and the "fancy-looking address bar" design was abandoned. The functionality of the EM_SETHILITE and EM_GETHILITE messages was ripped out, but the message numbers were left behind to avoid build breaks in case anybody was using those messages. Of course the messages have no effect any more, but at least the product still builds. The people who were using the message can then wean themselves from it on their own schedule.

This is one of the realities of developing both a library and the library's clients simultaneously. If you are the person who is responsible for the library and you intend to make a breaking change, you have to do it in stages so that all the clients can make the transition smoothly. It's not like you can go in and change all the clients yourself since they aren't yours to change, and you might not have access to the source code anyway. The clients belong to other teams, or even other companies. You have to coordinate with those other teams and let them know what your transition plan is so they can work it into their schedule.

The fact that the EM_GETHILITE and EM_SETHILITE messages still linger is just leftover dirt that never got cleaned up. What's in the header files now is the penultimate stage of the transition plan. The final stage would have been to remove the messages from the header file entirely, but the "no changes to public header files allowed" deadline came before the final stage could be executed, and now that the messages are in a public header file, they have to stay in there forever. Even though they don't do anything.

Comments (28)
  1. Mark says:

    Ray, are there any applications that implement (or used to) this old breadcrumb bar? I’m just curious what it would have looked like.

    Or maybe you happen to have a mock-up image of it like the original Windows 95 "tray"?

  2. Ulric says:

    I’ve installed Vista, and ho god that Breadcrumb  Bar (a picture would have helped identify what that control is) is perplexing.  

    n OS X, the attitude is more to provide the strict minimum a user needs, I thought Vista was trying to do this, too.  Part of the file open is though of people not understanding folder hierarchies, for example.

    I can see some weird users used to third-party explorer replacement excited about this, there is always someone for this stuff.

    Duplicating folder lists in the drop down when it’s in the tree or in the list view == same UI element/concept dupplicated in different format == UI design Red Flag.

    We were laughing at the office how you can click-and-release the path to get the old ‘dos path’ with slashes, surely a compromise.  So basically it tries to do everything for everyone.

    The worse is that this controls really wants to show off by glowing and highlighting on mouse move, to make sure you don’t miss its features, so it’s in the face of novice users, too.

    See, one hand hides the keyboard shortcut in menus to not scare users, and another does this.  A flashing path control system so that the power user with a good understanding of path hierarchies can perhaps once in a while click a combo in a part of the path to quickly jump there.

  3. duh says:

    um, well, thanks for stating the obvious that Vista is not OS X.  I do want to clarify two things though:

    the folder list dropdown is for recently browsed locations by the way, it’s not the same as the folder tree or the list view.

    the breadcrumb turns into an edit box with the path string, that’s not just for looking at.  You can enter any path string you want (even an URL) and explorer will open it for you.  Just a shortcut for a non-novice in situations where the keyboard’s faster than the GUI.

  4. ulric says:

    “Duh” :

    The explorer address bar in vista shows a path like

    “Computer > Local Disk(C:) > Windows > System32 > Branding”

    1) The folder list drop down when you press any “>” shows all the folders at that level, in a list. Does it show some of all, and not all of them all the time? I haven’t seen this; if so, even worse.

    2) I know that the breadcrumb when clicked turns into an address bar you can type in, explorer has always had this.

    The point is, it turns the display of the path into  “C:WindowsSystem32Branding”, and what we found funny at work is that it looks like there was one design idea for display, but then a compromise to do it the old way as well. So users are exposed to both.  And it’s a ‘magic click’ in a special location that will no doubt dumbfound novice users when they get in that mode.

    The point of my post — and I apologize as I know this rather inappropriate to do on this blog — is that this feature is what we call here a ‘dancing pig’ in UI design.  It tries to do everything for all users and ends up making worse for the average user.

    This was not about OS X, but rather that that one consistent way to show and do thing is enough, and that advanced users that want multiple shortcuts can get a third-party browser for their special needs.   Also, Vista clearly worked at simplifying for novice users in other places, so why go all Christmas Tree/Dancing Pig on the explorer address bar.  I’ve only felt a huge to write this because really I find that control pretty egregious in terms of feature creep, it’s not merely an annoyance but going 180 degrees compare to where UI design is going right now.

    [Where are you when people complain, “Why did Vista get rid of <my favorite geek UI feature X>?”? -Raymond]
  5. Sinner says:

    I don’t see it being confusing at all. Windows has always handled the balance between novice users and geeks better than any OS.

  6. Lorenzo says:

    Raymond> Where are you when people complain, “Why did Vista get rid of <my favorite geek UI feature X>?”?

    I was in the beta program, complaining for my favorite “geek” UI features removed from Vista… One for all: the “list” style in the file list-view… hundreds of people were complaining for the same thing, and hopefully it was restored. It was – really – a showstopper for me! And I still miss a lot of little not-really-so-geeky UI features inexplicably removed from Vista. I will complain forever!

    [In other words, no matter what happens, either you or ulric will say “Windows sucks.” -Raymond]
  7. Colen says:

    I think the ‘breadcrumbs’ in vista is an excellent feature – it’s one of the few things that make me actually want to use Vista. Just posting so that the comments don’t fill up with negative Nancy’s (Nancys? Nancies?) as usual. :)

  8. ChrisMcB says:

    i’m not sure I understand what ulric’s complaint is.

    He says "there was one design idea for display, but then a compromise to do it the old way as well."

    So it sounds like he is complaining about two different views? The views of the filename look similar to me, the difference is the separator. In one view is arrows, cause, as you point out, you can click on them. In the other view they are "/" I’m guessing because "/" is WAY easier to find on a keyboard than the arrow symbol (notice that it isn’t a ‘>’)

    They could have made the design show the file name of the directory as WELL as a breadcrumb list. But the designers tried to simplefy the design and merge the two. With one exception I think they did a fine job. (The one exception is what you pointed out at clicking on some random spot to change it to edit view)

    I also disagree with forcing anyone, even advanced users, to grab a 3rd party software. A good UI design should work well for both beginners and advanced users.

    There are a lot of problems with UI design today, but that control is NOT the poster child of UI design issues.

  9. Nick says:

    I realize that this is going (or has gone) off-topic, but Vista is one of those words that has that effect on a conversation.

    My problem is when people think that "geeky features" are just for geeks and are largely useless or redundant.  The fact is that these are features which allow you to make faster and more efficient use of your computer.

    The address bar is a perfect example.  If I know I want to go to \serversharefoobarbaz I have two options.  I can either type in that UNC and press enter. Elapsed time: 6 seconds.  The second option is to open Network Places, wait, wait, wait, look for \server, click it, wait, wait, see share and click it, find foo click, find bar, click, find baz, click. Elapsed time: easily a minute or more depending on network topography (YMMV).

    "Geeky features" can also be a euphemism for "give the user control".  I’m tired of people thinking that BillG or SteveJ knows what I want to do with my computer. A perfect example is Vista’s removal of the Edit File Type dialog box from Folder Options. This functionality wasn’t moved or changed, it was simply deleted.  For me, this is just about showstopper when it comes to Vista–not entirely because of the loss (which is significant) but because of what it represents: lack of user control.

    I’m not some Linux/OSX bigot who hates Windows.  I’m an experienced Windows system administrator who loves XP.  I think it’s mostly users like me who will have problems with Vista, problems which didn’t need to be problems at all.  This is unfortunate because I also think it’s users like me who will most easily make the change to Linux or Apple.

    I’m sure decisions made at Microsoft for primary products like the Windows line aren’t arbitrary, but sometimes they sure feel like it. This is when I wish there was more dialog between Microsoft and it’s users, though these blogs are a great start and beta programs are pretty good too.

    Okay, this became an off-topic rant.  I almost cancelled posting but since I know you work on the shell I thought it was at least a little bit related. Sorry Raymond.

  10. Jivlain says:

    I quite like the breadcrumbs too.

  11. Miral:

    Actually, it’s standard for breadcrumbs bars to show hierarchy rather than history.


  12. KJK::Hyperion says:

    CDE had breadcrumb bars too, but I always found it a waste of space to have both that and the address bar. I think Vista does the right thing, and I had designed an identical widget years ago. And don’t kid yourselves: if OS X had this, the only difference would be that you activate the path editor with an undocumented keyboard shortcut instead of a click

  13. Yuhong Bao says:

    BTW, which builds of Vista used the EM_SETHILITE message?

  14. Dan says:

    I love the breadcrumb bar.  One click brings me up as many levels as I want, two clicks moves me to a sibling/aunt/uncle folder.

    I don’t think it’s a duplication of the tree UI… the tree shows all folders, collapsing ones you don’t care about ATM.  The breadcrumb bar focuses more on sibling/parent folders, while parent folders in a tree tend to get hidden if there are lots of sibling folders.

    The click functionality may be confusing to a novice, but unless a second address bar is used, it’s critical for allowing pre-Vista functionality like copying the folder path or typing a path manually.

    Also any such confusion is minimized since clicking off of the control restores the breadcrumb bar.  Little danger of a user getting so confused they have to close the window and try again.

    Also as a final thought, it sounds like the builds of Vista mentioned with these messages would look/work a bit like Firefox’s Locationbar2 extension, which is itself an implementation and extension of some new Firefox 3 UI on the address bar to emphasize the domain name in URLs to help identify spoofing.  This extension has a breadcrumbs mode, which the Firefox 3 UI doesn’t do I think (it tries to stick to a normal edit box), and all breadcrumbs are hyperlinks which take you up the hierarchy.

  15. KJK::Hyperion wrote: "if OS X had this, the only difference would be that you activate the path editor with an undocumented keyboard shortcut instead of a click"

    Well, not the only difference – the other one being that ulric (or some other UI omniscient) would likely be here telling us how much more "correct" it was than whatever Windows had.

    It’s a no-win.  If MS leaves it alone, people complain there’s nothing ‘new’ in Vista.  If they implement a new address bar (which is simply great, btw), then people complain that they like the old one.  So they give the new address bar the ability to revert to the old behavior with a single click…people complain that it’s design-incorrect to have two ways of working with things.  So, to make everyone happy, should they now put in a user-preference to enable/disable the new address bar entirely?  If so, I guarantee that no matter which state was to be made active by default, it’d be the wrong one…not to mention that the next complaint would be about Windows having too many hard-to-find options.

    And that’s just Explorer’s address bar.

    On second thought, there is a perfect solution:  just put ulrich in charge of shell UI design…this stuff is so trivial to him that he and his buddies sit around the office ‘laughing’ about how bad the current design is.

    But then he might need to have a blog explaining the particulars of how and why things are done as they are.  Of course, his blog wouldn’t be complete without users posting off-topic rants about how wrong his design was, and how much better they would’ve done it…when his original post was only attempting to explain how it sometimes happens that there are some vestigial elements left in a public API.

  16. mvadu says:

    Oh.. My god.. I really pity Raymond.. He gave an example of unused constants (EM_SETHILITE message) and out of 16 comments only two (Mark and Yuhong Bao) speaks about it.

    Raymond have some filtering policy on comments.. it should search for some keywords you define for each post, if at least one is there then allow the comment or simply discard it.. (my comment still get in because it have part of the post title)

  17. Miral says:

    I like the new breadcrumb bar too (especially since it lets me switch folders while staying in the same window; something that double-clicking on a folder does not do despite my asking it to).  I also like the way that you can get back to a simple address bar so you can eg. copy & paste the path.  I use that a lot.

    What I don’t like is it being called a "breadcrumb bar", since it’s really just a restyled address bar.  It does *not* show breadcrumbs — if I’m in C:Foo and open a link to D:Bar, it’s going to show "Computer – D: – Bar", not "Computer – C: – Foo – BarShortcut".  (I don’t have a problem with the behaviour.  Just the name.)

  18. JM says:

    @mvadu: If you really started reading the comments hoping for a riveting discussion on unused constants, you’re just not having the right expectations. If Raymond wanted to make sure there were no "inappropriate" comments, his only recourse would be to disable comments altogether.

    Besides, any line of comments that does not degenerate into a discussion on the technical and social merits of Microsoft as a company is a win in my book.

  19. Subjective says:

    > I think the ‘breadcrumbs’ in vista is an excellent feature – it’s one of the few things that make me actually want to use Vista.

    It’s the biggest reason I abandoned Vista and got back to XP — slower (to me) and less functional than the up-button. I find it much harder to check "where to click" instead of just going to the button which is always there in the same position and click the number of times you want to go up. Beside, you can Ctrl+Click and duplicate in XP which you can’t with the breadcrumb. You can do it with Alt+Up but you have to leave the mouse with the right hand and usually shell operations are very mouse intensive for my usage pattern (except that with "full row select" in vista those mouse operations go bad quite often, but that’s another story).

    This is probably the demonstration that you can’t satisfy anybody in UI design.

  20. Mike Dunn says:

    Just curious, if the only client that ever used EM_SETHILITE was Explorer – and only early designs of Explorer – then what’s the danger in removing EM_SETHILITE from the public header file?

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

  21. Paul says:

    > It’s the biggest reason I abandoned Vista and got back to XP — slower (to me) and less functional than the up-button.

    Hitting backspace still works under Vista…

  22. Paul says:

    > A perfect example is Vista’s removal of the Edit File Type dialog box from Folder Options

    Removed from there but relocated to Control Panel>Default Programs

  23. Subjective says:

    > Hitting backspace still works under Vista…

    Only moving the left hand from the left of the keyboard (where it can Shift,Alt,Ctrl,W,Z,V,X,S,A,F2 -> practically all the useful keys) or the right hand from the mouse.

    Also the clone is a MAJOR issue for me.

    This whole change really slows me down a lot (I even stopped using Windows in my native language and went far buying an english one just to have Ctrl+A for select all).

  24. Ulric says:

    I also disagree with forcing anyone, even

    advanced users, to grab a 3rd party software.

    A good UI design should work well for both

    beginners and advanced users.

    A good UI design should "work well" for most users.  Most users are intermediates, not advanced, or novice.  Others adapt.

    For all the edge cases, like the multitude of redundant shortcuts for everyone and his brother, yes, advanced users should have to get a third party add-on.  Windows is a great OS particularly because it’s customizable.

    "Advanced users" is a fictional persona,  an elastic persona that is exactly equal to what the engineer likes, so he has carte blanche to program everything he wants. This is how we get dancing pigs in UI design.

  25. MythBuster says:

    It’s a no-win.  If MS leaves it alone, people complain there’s nothing ‘new’ in Vista.

    Now this sentence strikes me. Strikes me hard. Does that mean that Microsoft is flooded with requests for new features? I remember how hard it was to persuade most, if not all, of my colleagues to make the transition from 98 to XP. These days, the most frequent line I hear is: "Vista? Naaah, I’ll wait for SP or 2".

    But maybe those people (vast majority that I communicate with) are not typical. Maybe the majority in the world is, as someone said, "advanced users". Maybe the majority in the world is not struck by inertia and fear of the unknown. Yeah, that would be a beautiful world to live in. A world where a product (operating system, for example), if it works, does not become "legacy" after a fixed number of years.

    Keep on dreaming, dreamer.

  26. Miral says:

    "Removed from there but relocated to Control Panel>Default Programs"

    Yeah, but also gutted in functionality.  (Admittedly, power-user functionality.)  I’ve found myself resorting to registry edits on occasion to get it to do what I want, since the UI just doesn’t provide the option.

  27. 640k says:

    One thing is sure, if windows 2010+ get this functionality, the EM_SETHILITE and EM_GETHILITE will not be reused. Instead 2 new messages will be allocated.

  28. Nick says:

    "Removed from there but relocated to Control Panel>Default Programs"

    As Miral said, the functionality provided by that dialog box was cut by 98%.  All that’s left is the "choose default program" function that’s found in a dozen different places around the OS.

    One of the things I’ve always done to the shell is add new context items to files I work with.  For example, I add a "Open with Firefox" option to HTML files. Now in order to do that I either A) download a 3rd party tool or B) dig through the registry.

    I’d be delighted if there’s someone who can explain how this helps *anyone*?

Comments are closed.

Skip to main content