Following UPI Recommendations

HomeOverviewHow Do I

Your Windows 95 application must define both large and small icons. AppWizard automatically defines default 32x32 and 16x16 icons for both the application and the document type when generating MFC applications. If you replace the default icons with your own, remember to replace both the large and small versions. In addition, you have to register the icon for your document type with the system registry under the DefaultIcon key. MFC does this with the CWinApp::RegisterShellFileTypes function; AppWizard inserts a call to this function automatically if you specify a three-letter filetype extension for your application’s document. You can also register the icon in your setup application; see Creating a Setup and an Uninstall Program below for more information.

Your Windows 95 application must use the system colors and metrics for its dialogs to be consistent with the user’s settings. The MFC library calls the GetSysColor and GetSystemMetrics API functions to determine how dialogs and controls should be displayed. As a result, your MFC application’s appearance will automatically reflect the system colors and metrics, even if the user changes some attribute while the application is running.

It’s also recommended, though not required, that your Windows 95 application use the Windows common dialogs where applicable. The common dialogs provide a great deal of functionality in their support of long file names and UNC paths, as mentioned above. An application that uses the MFC framework automatically uses the common file and print dialogs, and if you want to use any of the other common dialogs, you can use the MFC library’s wrappers. See Technical Note 60 and the descriptions of CFileDialog, CPrintDialog, CFindReplaceDialog, CColorDialog, and CFontDialog in the Class Library Reference.