My Photo
Location: Downham Market, Norfolk, United Kingdom

Tuesday, October 24, 2006

Windows generally does a pretty good job of achieving binary application compatibility between platforms. With a bit of care you can quite easily build a single executable that runs fine under all versions of Windows from 95 to Me and NT4 to XP. BBC BASIC for Windows is a case in point; the only place in the code where the version of Windows is detected is when adding an icon to the 'compiled' executable, because the improved resource-editing features in Windows NT/2000/XP make it practical to support multi-format icons.

This is one area where Windows is vastly superior to Linux. The concept of binary compatibility between Linux distributions is largely non-existent (I believe it can be achieved, but it is difficult and probably involves a lot of version checking and OS-specific configuration). Linux users typically think nothing of having to recompile an application from scratch when moving it to a different platform, even when the processor is the same. This isn't very practical for a commercial application, nor for a non-computer-savvy user.

However having sung the praises of Windows in this respect I am really annoyed with Microsoft's decision to discontinue support for Windows Help (WinHelp) in Windows Vista (see BBC BASIC for Windows has used HTML Help for its main help and tutorial facilities from the beginning, so fortunately they are not affected, but its context-sensitive help - both in dialogue boxes and in the main editing window - uses WinHelp. Attempting to access it under Vista simply results in the appearance of a "Why can't I get help from this program" window.

Whilst I have no real issue with Microsoft's desire to ditch WinHelp in favour of HTML Help for the main help viewer - HTML Help is certainly more functional - the same does not apply to context help or popup windows. HTML Help does provide these facilities, but they are substantially less well executed than the WinHelp equivalents. Here are a few respects in which HTML Help's popup windows are inferior:
  • Formatting rules are very strange. Whilst WinHelp will attempt to produce a sensibly-shaped window HtmlHelp will sometimes produce a long narrow strip the full width of the screen.
  • HtmlHelp popup windows don't position themselves to avoid overlapping the taskbar, with the result that the bottom of the window can be behind the taskbar and hence invisible (and of course it can't be moved by the user).
  • With WinHelp you can right-click on the popup and either copy it to the clipboard or print it. HtmlHelp provides no similar facility.
  • Even if you've specified a margin of several pixels in the HH_POPUP structure you don't necessarily get any margin if the popup meets the edge of the screen.
  • To force a line break you have to double line space the source text used by the HTML Help compiler. Single line terminations seem to be ignored, and the lines are concatenated when displayed in the popup.

These are not the only problems. Because Vista does not ship with Windows Help all context-sensitive help in common dialogue boxes is absent! A nice feature of all versions of Windows from 95 to XP is that the common 'system' dialogue boxes (GetOpenFileName, Print, ChooseFont, ChooseColor etc.) come with built-in context help. You can either right-click on a control, or click on the ? button in the title bar, to get a concise description in a tooltip of what that control does. All this has completely disappeared in Vista, and there's no way of getting it back (short of using custom dialogue templates and procedures for every one).

I've read comments that modern programs have so many controls that to provide context-sensitive help for every one would be impractical, and that 'per page' help (e.g. activated using the F1 key) is the way to go. Well, yes, maybe but where does that leave the common dialogue boxes - you can press F1 till the cows come home and nothing will happen. And what about binary compatibility, which is where we came in? Existing programs which use WinHelp simply won't work properly.

Since Microsoft announced that, after all, WinHelp will be available for Vista as a user download some people seem to be planning to continue using it. But the devil is in the detail: Microsoft clearly states that "third-party programs that include .hlp files are prohibited from redistributing the Windows Help program together with their products" so it isn't an option for commercial applications like BBC BASIC for Windows.

So if I want to support Windows Vista I'm going to have to bite the bullet and replace WinHelp with HTML Help for the main context help in the editor window. Context help in the common dialogues will disappear, except for those that I've customised (although whether it's sensible to have context help in just some of the dialogue boxes is debatable). In my view Microsoft didn't properly consider the impact on context help and popups when deciding to drop WinHelp, and there's bound to be a fuss when more people discover it.


Post a Comment

<< Home