What's up with Office 2013's context menu and tooltip shadows?

Update (2015-04-22): Somewhat surprisingly, a recent Office 2013 patch appears to have fixed this issue.

Update (2015-03-04): Office 2016 fixes this.

Update (2014-10-03): Office 2013 running on the Windows 10 Technical Preview (build 9841) exhibits the same issue 🙁

At some point in the not-too-distant past, Office 2013 started rendering strange shadow artefacts in the four corners of all context menus and tooltips:

Screenshot of Word 2013 Context Menu Shadow Artefacts

This didn’t always happen, as a quick search for ‘Word 2013 screenshots’ will reveal lots of images of glitch-free floating windows. I’m too lazy to check, but I’ll hazard a guess that this started happening with Windows 8.1 or Windows 8.1 Update 1.

Being Office, they’ve re-implemented every GUI element themselves instead of letting the OS handle them. One can sympathise with this approach, but it’s important to get the little details right. A bit like how the IE team should finally spend the time to get their scrollbars right. Of course, it’s folly to ever expect UI consistency on Windows when even Microsoft can’t get it right.

A man can dream, though. A man can dream.

Enabling the compatibility property sheet for (almost) all programs in Windows 8/8.1

Windows 8 and 8.1 hide the compatibility property sheet for certain programs (namely programs included with Windows, like Notepad, and those on a whitelist of programs known to run correctly on Windows 8/8.1 – defined in %WinDir%apppatchpcamain.sdb). In some cases, one can still run the ‘troubleshoot compatibility’ wizard by right-clicking on the file, which just presents compatibility settings in a novice-friendly, poweruser-unfriendly way.

The compatibility property sheet and context menu are defined in acppage.dll. By patching this DLL, we can enable the compatibility property sheet for (almost) all programs, including programs like Notepad and those whitelisted in pcamain.sdb.

Patching Windows system DLL files is probably a bad idea, and I take no responsibility if your computer explodes after you take the following steps.

I’ll write a tool to automate this process at some point, but for now, here are the manual steps if you’re feeling adventurous:

  1. Make a backup of acppage.dll from %WinDir%System32
  2. Take ownership of acppage.dll in %WinDir%System32:
  3. Grant administrator users full control over acppage.dll:
  4. Using your favourite hex editor (I like XVI32), overwrite the two bytes at the relevant address to 0x31 0xC0:

    • Windows 8.1 64-bit: 5A92 (the original bytes should be 0x8B 0xC7)
    • Windows 8.1 32-bit: 4B26 (the original bytes should be 0x8B 0xC6)
    • Windows 8 64-bit: 4DBB (the original bytes should be 0x8B 0xC3)
    • Windows 8 32-bit: 3D44 (the original bytes should be 0x8B 0xC6)

    Warning: If the existing bytes don’t match with what I’ve written above, don’t overwrite them! The addresses change with patches to Windows. The above addresses were current as of 2013-09-04.

  5. Restart explorer.exe

Voilà – the compatibility property sheet will appear for most programs now (I’ve noticed that it doesn’t show up for File Explorer):

Screenshot of Notepad.exe and the Compatibility property sheet

How does this actually work?

These two bytes are in the CLayerUIPropPage::Initialize function – this basically does a bunch of checks to determine whether the property sheet should be displayed or not. The original code (0x8B …) sets the return value (the EAX register) to the result of these checks – a non-zero result means the sheet won’t be displayed. We modify the function to always return 0 by using the instruction xor eax, eax (0x31 0xC0).

Windows 8.1 Impressions

Windows 8.1 is done, though Microsoft is apparently worried enough about driver and application support that not even loyal MSDN and TechNet subscribers will get it until October 17 this year. To no-one’s surprise, the RTM ISOs were promptly leaked, which leaves us in the odd situation where the only way to test your programs against the latest version of Windows is to download disc images from shady websites.

My impressions of Windows 8.1 don’t differ much from what I wrote earlier this year when it was still ‘Windows Blue’: no-one who hates Windows 8 is going to be swayed by Windows 8.1, but if you love Windows 8, you’ll probably love Windows 8.1.

For all that’s been written about the return of the Start Button, there are very few concessions towards desktop users in Windows 8.1. Including ‘boot to desktop’ and ‘use desktop background on Start Screen’ as options makes the overall user experience slightly less jarring, but it’s really nothing to get excited about. I highly recommend StartIsBack to restore the Windows Vista/7-style Start Menu. Start Menu programs abound (what does that tell you?), but StartIsBack really feels like it’s part of Windows, not a third-party program.

The biggest change that Windows 8.1 brings to the desktop is improved high DPI support – Windows now supports per-monitor DPI, and no longer requires users to log off in order to change their DPI settings. I’m sceptical about how many applications will bother supporting this functionality, but it’s a nice feature to have.

Given that Windows 8.1 doesn’t offer much to desktop users like me, I might as well write about annoyances introduced with this version.

New annoyances

  • Microsoft has made it hard to create a local account when installing Windows (as opposed to using a Microsoft account to sign in). Windows 8 strongly encouraged you to use a Microsoft account, but Windows 8.1 is worse – the only methods I’ve found to avoid this are to disable network connections or to type in a bogus email address – only then will Windows offer to create a local user account.
  • SkyDrive is now integrated with Windows, but apparently only if you sign in with a Microsoft account (see above). I guess I won’t be using the desktop SkyDrive client anymore.
  • Libraries are hidden by default, and even when they’re turned on, the navigation pane in File Explorer is polluted with shortcuts to the ‘Desktop’, ‘Documents’, ‘Downloads’, ‘Music’, ‘Pictures’ and ‘Videos’ folders (not libraries), as is the main ‘This PC’ (formerly ‘Computer’ – who decided changing that was a good idea?).
  • Unlike some, I don’t hate the default background images (though I question the choice of the orange default image), but the JPEG compression is horrendous. I’m shocked that Microsoft included such low-quality images in Windows.

None of these are show-stoppers, but coupled with the fact that Windows 8.1 offers almost nothing new for desktop users, it’s hard to get excited about this update.