Microsoft KB Archive/154648

= FIX: Toolbars Broken in ENROLL Tutorial Samples =

Article ID: 154648

Article Last Modified on 11/21/2006

-

APPLIES TO

 Microsoft Foundation Class Library 4.2, when used with:  Microsoft Visual C++ 5.0 Learning Edition

 Microsoft Visual C++ 5.0 Learning Edition

 Microsoft Visual C++ 4.2 Enterprise Edition

 Microsoft Visual C++ 4.0 Professional Edition</li></ul>

 Microsoft Visual C++ 4.1 Subscription</li></ul>

 Microsoft Visual C++ 4.2 Professional Edition</li></ul> </li></ul>

-

<div class="notice_section">

This article was previously published under Q154648

<div class="symptoms_section">

SYMPTOMS
If you build the ENROLL tutorial, you will see that there is a "+" Toolbar button that brings up the About dialog box instead of adding new records. The additional buttons, "\", "-" and "?" are not present.

<div class="cause_section">

CAUSE
The Enroll.rc file is missing for the Toolbar buttons even though the bitmap for the Toolbar has images for all the buttons in it.

<div class="resolution_section">

RESOLUTION
The Toolbar section has the following IDs listed in Enroll.rc: // Toolbar //

IDR_MAINFRAME TOOLBAR DISCARDABLE 16, 15 BEGIN BUTTON     ID_EDIT_CUT BUTTON     ID_EDIT_COPY BUTTON     ID_EDIT_PASTE SEPARATOR BUTTON     ID_FILE_PRINT SEPARATOR BUTTON     ID_RECORD_FIRST BUTTON     ID_RECORD_PREV BUTTON     ID_RECORD_NEXT BUTTON     ID_RECORD_LAST SEPARATOR BUTTON     ID_APP_ABOUT END The IDs should be the following: // Toolbar //

IDR_MAINFRAME TOOLBAR DISCARDABLE 16, 15 BEGIN BUTTON     ID_EDIT_CUT BUTTON     ID_EDIT_COPY BUTTON     ID_EDIT_PASTE SEPARATOR BUTTON     ID_FILE_PRINT SEPARATOR BUTTON     ID_RECORD_FIRST BUTTON     ID_RECORD_PREV BUTTON     ID_RECORD_NEXT BUTTON     ID_RECORD_LAST SEPARATOR

BUTTON     ID_RECORD_ADD BUTTON     ID_RECORD_REFRESH BUTTON     ID_RECORD_DELETE SEPARATOR BUTTON     ID_APP_ABOUT END Open Enroll.rc as a text file in MSDEV. Go to the Toolbar section, and add the following four lines after "BUTTON ID_RECORD_LAST": SEPARATOR BUTTON     ID_RECORD_ADD BUTTON     ID_RECORD_REFRESH BUTTON     ID_RECORD_DELETE Rebuilding the application should fix the problem.

<div class="status_section">

STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was fixed in Visual C++ version 5.0.

Additional query words: kbVC400bug

Keywords: kbbug kbfix kbuidesign kbdatabase kbvc500fix KB154648

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.