Using WinHelp for Popup Information

Posted by Kirby Turner on July 7, 2005

I want to include a legend feature in SMTP Diagnostics to give users a clue as to the meaning of various icons used in the program. I initially tried to accomplish this by creating a new borderless window that displayed the legend. When the user clicked the legend link in the statusbar the legend window would popup. But I found an easier way to do this.

Instead of creating a new window and doing all the leg work behind the scenes to display the window, position the window, add shadowing to the window and so on, I decided to use a WinHelp popup. WinHelp popups are used in many applications such as Microsoft Office to display “What’s This?” Help. A nice feature of WinHelp popups is content can be formatted. In the case of SMTP Diagnostics, a WinHelp popup topic is used to display the legend with the icon on the left followed by the text describing the meaning of the icon.

The end result. I reduced the code used in my first attempt at displaying a legend to a single line of code. Delphi and WinHelp do all the work of displaying, positioning, and shadowing the legend window.


Click image to enlarge.


Posted in uncategorized. Tagged in .