INFO: Open File Dialog Box -- Pros and Cons

ID: Q74612


The information in this article applies to:


SUMMARY

Applications can call the common dialog library (COMMDLG.DLL) function GetOpenFileName() to retrieve the name of a file that the user wants to manipulate. Using this DLL provides a common interface for opening files across applications and also eliminates dialog-box message processing within the application's code. However, the application must initialize a structure specific to the dialog box. This article discusses the benefits and costs of using the Open File common dialog, via GetOpenFileName().


MORE INFORMATION

When an application uses the Open File dialog box provided by the common dialog DLL, the primary benefit to that application's users will be a familiar interface. Once they learn how to open a file in one application that uses the DLL, they will know how to open a file in all applications that use it.

Features of the Open File dialog include:

For the application's programming staff, the benefits of using the Open File common dialog will include:
The cost for the programming staff could be in adapting previously written application code to handle the common dialog interface. While making this change is straightforward, it does require coding time. If the application only needs a filename with no path, the Open File common dialog is probably not appropriate.

For more information on using the Open File common dialog, query on GetOpenFileName().


Keywords          : kbCmnDlg kbCmnDlgFileO kbCmnDlgSave kbGrpUser 
Version           : 
Platform          : 
Issue type        : kbinfo 

Last Reviewed: March 7, 1999