CVW Prompts for WINMAIN.CPP Location Debugging MFC App

Last reviewed: July 17, 1997
Article ID: Q91670
7.00 | 1.00 1.50 MS-DOS | WINDOWS kbprg

The information in this article applies to:

  • The Microsoft Foundation Classes (MFC) included with:

        - Microsoft C/C++ version 7.0
        - Microsoft Visual C++ for Windows, versions 1.0 and 1.5
    

When CodeView for Windows (CVW) or CodeView for Windows 32s is used to debug an application created with the Microsoft Foundation Classes (MFC), where CodeView information is included in the executable file, CVW prompts for the path to the WINMAIN.CPP file when the application first loads. (By default, WINMAIN.CPP is located in the ..\MFC\SRC directory.) If the user does not specify the correct path to WINMAIN.CPP, CVW displays assembly language for the initialization portion of the application.

WINMAIN.CPP contains the WinMain() function, which CVW considers to be the entry point for the application. Even though the code from WINMAIN.CPP is part of every MFC application, it is not necessary to trace through the MFC code every time an application is debugged.

To avoid tracing through the MFC initialization code, perform the following five steps:

  1. Choose Open Module from the File menu.

  2. Select the module that contains the code where you want to begin tracing.

  3. Select the source file for that module. The source code in that file will appear in the Source window.

  4. Set a breakpoint on an executable line in the appropriate function.

  5. Press "F5".

CVW stops executing the program at the breakpoint. From there, you can continue tracing or step through the application's code.


Additional reference words: kbinf 7.00 1.00 1.50 2.00 2.50
KBCategory: kbprg kbfasttip
KBSubcategory: MfcMisc
Keywords : kb16bitonly
Technology : kbMfc


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 17, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.