Microsoft KB Archive/214731

= PRB: AppWizard Bug when Altering ActiveDoc Child Window Styles =

Article ID: 214731

Article Last Modified on 12/2/2003

-

APPLIES TO


 * Microsoft Visual C++ 5.0 Enterprise Edition
 * Microsoft Visual C++ 6.0 Enterprise Edition
 * Microsoft Visual C++ 5.0 Professional Edition
 * Microsoft Visual C++ 6.0 Professional Edition
 * Microsoft Visual C++ 6.0 Standard Edition

-



This article was previously published under Q214731



SYMPTOMS
When creating an MDI Active Document Server using the AppWizard if any of the Child Frame window styles are adjusted (using the Advanced button in the wizard) a set of style flags will be generated for the CChildFrame class which includes the WS_VISIBLE flag. This causes problems when documents created by this application are loaded in an Active Document Container, such as Internet Explorer. If the ActiveDoc Server application is running when one of its documents is loaded into a container, such as Internet Explorer, the loaded document will also be visible in the server application. Otherwise, if the server application is not running and a document is loaded into a container, the server application will continue as a process after the document, or even the container, is unloaded.



CAUSE
The cause is the WS_VISIBLE flag addition to the Child Frame. Active Document Server child windows should not have this flag because their visibility is controlled by the manner in which they are instantiated.



RESOLUTION
Remove the WS_VISIBLE flag from the style group in CChildFrame::PreCreateWindow.



STATUS
Microsoft is researching this problem and will post new information when it becomes available



Steps to Reproduce Behavior

 * 1) Use the AppWizard to create an MDI application.
 * 2) In step 3 of the AppWizard specify Both Container and Server and select Active Document Server.
 * 3) In step 4 of the AppWizard click Advanced and then click the Window Styles tab.
 * 4) Change any of the MDI child frame styles.
 * 5) Be sure to provide a file extension on the Document Template Strings tab.
 * 6) Complete the AppWizard and compile the application.
 * 7) Save a document from the application.

Following are the two primary scenarios in which an error will occur once the application has been generated and a document created:


 * Run the application and keep it running. Start Internet Explorer 4 and load a document saved by the application. The document will load in Internet Explorer, but will also be displayed in the ActiveDoc Server application. In addition, there is no way to activate the application while the document is displayed in Internet Explorer unless Internet Explorer is minimized. Even then, the situation is unstable because closing the document will cause an error.
 * Do not run the application. Start Internet Explorer 4 and load a document saved by the application. After closing the document, or even after closing Internet Explorer, the ActiveDoc Server is still running as a process.

Keywords: kbactivedocs kbprb KB214731

-

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

© Microsoft Corporation. All rights reserved.