The MFC AppWizard (exe) has the following problems when generating
applications that do not support the Document/View architecture:
SDI applications that do not support the Document/View architecture have
disassociations between their toolbar buttons and their images. These
disassociations also exist when Context-sensitive help is supported.
MDI applications that do not support the Document/View architecture but
have Context-sensitive Help do not have a Help toolbar image.
The MFC AppWizard uses the same toolbar bitmap for both SDI and MDI
applications that do not support the Document/View architecture. This
bitmap is also used when Context-sensitive help is selected in MFC
AppWizard step 4. This bitmap does not contain the Help toolbar image.
In the case of SDI applications, there is no File New toolbar button
generated. This causes a disassociation between the toolbar buttons and
their images. For example, the Help About toolbar button has the Print
image on it. When Context-sensitive help is selected, the Help toolbar
button has the Help About image on it.
SDI Applications That Do Not Support the Document/View Architecture
Add a File New toolbar button by modifying the applications resource
On the File menu, click Open, and open the applications resource file.
Select <yourapp>.rc file and specify OpenAs Text. Add the following to
the Toolbar section:
IDR_MAINFRAME TOOLBAR DISCARDABLE 16, 15
BUTTON ID_FILE_NEW //<-Add the File New toolbar button.
SEPARATOR //<-Add a toolbar separator.
SDI Applications Without Document/View Architecture but Support Help
Make the above modifications as well as modifying the applications toolbar
bitmap. You'll need to export a bitmap from the MFC AppWizard resource DLL,
which has a Help toolbar image:
On the File menu, click Open, and open the MFC AppWizard resource DLL.
Navigate to the ..\MSDev98\bin\ide directory. Select Mfcapwz.dll and
specify OpenAs Resources. Click Ok.
Expand the Template directory, right-click Tbah_.bmp, and click Export.
Specify a name and directory for the bitmap, and click Export.
On the File menu, click Open from the main menu and navigate to the
directory where you saved the bitmap. Double-click the bitmap to open it
in the resource editor.
In the Graphics window, select the Rectangle Selection tool if it is not
already selected. Using the mouse, select the Help image by dragging the
mouse over it. On the Edit menu, click Copy.
NOTE: Toolbar button images are 16x15 pixels in size. The area you
select should be 16x15 and can be verified in the status bar.
In ResourceView, expand the Toolbar folder. Double-click IDR_MAINFRAME
to open the Toolbar editor. Select the empty button to the left of the
Help About button. On the Edit menu, click Paste. Click the Help About
toolbar button. The Help image should now be on the Help toolbar
Save IDR_MAINFRAME and rebuild the application.
MDI Applications Without Document/View Architecture but Support Help
Make the above modifications to include the Help image in your applications
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.
This bug was corrected in Visual Studio 6.0 Service Pack 3.
For more information about Visual Studio service packs, click the following article numbers to view the articles in the Microsoft Knowledge Base:
SDI applications that do not support the Document/View architecture do not
have File New menu support, because a Frame and View are always created
for you when the application is run. You can edit the code to include a
File New menu and handler if you like.
Steps to reproduce the behavior
Create a project using the MFC AppWizard (exe). In step 1, select Single
Document and clear Document/View architecture support. Accept the
defaults in step 2 and 3. In step 4, select Context-sensitive help and
Build and run the application. Verify that the toolbar tooltips are
Create a project using the MFC AppWizard (exe). In step 1, select
Multiple Document and clear Document/View architecture support. Accept
the defaults in step 2 and 3. In step 4, select Context-sensitive help
and click Finish.
Build and run the application. Verify that the Help toolbar button has