Standard dialog boxes to handle commonly performed user dialogs may also be generated and placed in dynamic link libraries. The inclusion of a dialog box in a DLL however, is slightly more complicated than the inclusion of a "normal" display or object window, due to the definition of the dialog template as a Presentation Manager resource. The DLL must therefore include not only the dialog procedure and the invoking routine, but also the dialog template definition.
This necessitates the invoking routine within the DLL not only executing the WinDlgBox() function call, but also obtaining a module handle for the DLL and an entry point address for the dialog procedure. The necessary steps are as follows:
The invoking routine for a dialog box loaded from a DLL is described, along with an example, in Figure "Loading a Dialog Resource From a DLL".