Geoff Chappell - Software Analyst
There was a time when writing a program’s user interface meant writing actual program code. The basic controls and their positioning on menus or in dialog boxes might be prepared using graphical design tools with no program code in sight. They would then be specified in the executable’s resources and could easily enough be loaded into view by a single Windows API call to a function (or macro) such as DialogBox or CreateDialog. So far, so simple, but there can be a lot of program code required to support the dialog box through its interaction with the user and then to interpret whatever the user has done. Moreover, this program code is highly specific to the Windows API, particularly because it has the form of a dialog box procedure receiving window messages.
Those days are not yet passed, but increasingly many user interfaces are laid out as HTML pages whose own script does much of the run-time management and interpretation. This is apparently a benefit to everybody, including the manufacturers of the ever-faster computer hardware that is needed if the obvious bloat is not to be obvious visually.
MSHTML exports several functions that display an HTML page as a user-interface feature such as a property sheet or dialog box:
These are all documented (excusing omission of ShowModalDialog since it is in effect just an alias of ShowHTMLDialog). However, the Windows SDK goes out of its way to make the functions awkward to use, giving directions such as “you must dynamically load the DLL and call this function by using the LoadLibrary and GetProcAddress functions.” The reason is just that the Windows SDK doesn’t have an import library for MSHTML functions. You could write your own, of course. Or Microsoft could save everyone some trouble, including its own documentation writers, by publishing the import library that Microsoft already has. Where Microsoft’s own IEFRAME.DLL imports three of these HTML Dialog functions, it does the job the easy, natural way, because it has the advantage of being linked with an import library, MSHTMLP.LIB, that Microsoft does not supply with the Windows SDK.