BUG: Breakpoint on WM_MDIACTIVATE Code Maximizes Windows

ID: Q108290

1.00 1.50 1.51 1.52 WINDOWS kbtool kbbuglist

The information in this article applies to:

SYMPTOMS

Setting a breakpoint in the Visual Debugger on code executed as a result of a WM_MDIACTIVATE message causes the window in the application to be maximized.

RESOLUTION

Use CodeView for Windows to debug the application instead of the Visual Debugger.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

This problem does not occur in the 32-bit debugger.

MORE INFORMATION

To reproduce the problem, follow these steps:

 1. Modify the BLANDMDI sample program in the \MSVC\SAMPLES\BLANDMDI
    directory. Add the following code to the beginning of the
    BlandMdiChildWndProc() function in the BLANDMDI.C source file:

       switch (msg)  {
         case WM_MDIACTIVATE:
           if (wParam == TRUE ) {}
       }

2. Load the project in the Visual Workbench. Select Project, choose Open,
   and enter <path>\BLANDMDI.MAK.

 3. Rebuild the application. Select Project and choose Rebuild All.

 4. Set a breakpoint on the line of code containing

       if (wParam == TRUE) {}

    by placing the cursor on that line and pressing the F9 key.

 5. Press F5 to run; the code will execute to the breakpoint.

 6. Press F5 to continue executing.

 7. Select File and choose New.

 8. Press F5 to continue executing.

 9. Press F5 to continue executing.

10. Click once in the title bar of the "Initial Window" of the Blandmdi
    application.

11. Press F5 to continue executing.

12. Press F5 to continue executing.

13. The Initial Window is now incorrectly maximized. The only way to view

    the "Untitled" windows is by selecting the Window menu option and
    choosing Untitled.

Additional reference words: 1.00 1.50 KBCategory: kbtool kbbuglist KBSubcategory: WBDebug Keywords : kb16bitonly

Last Reviewed: July 23, 1997