Article ID: 223358 - Last Review: June 14, 2006 - Revision: 2.0 FIX: Creating more than two MDI children throws WFCExceptionThis article was previously published under Q223358 On This PageSYMPTOMS
When creating more than two Multiple Document Interface (MDI) child windows in the constructor of the parent window, a WFCException is thrown with a message that an error has occurred creating a window handle.
CAUSE
This problem is related to the time at which the Win32 window handles are created, which may not be the same time the child window objects are created in Java code.
RESOLUTION
To work around this problem, limit the number of child windows created in the constructor of the parent to two, and/or create child windows after the parent has been constructed. A third option is to use Control.invokeAsync() as illustrated in the commented code in the sample below.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in Visual Studio 6.0 Service Pack 3. For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base: MORE INFORMATION
In WFC, handle creation for children of an MDI parent is deferred until the parent Form is made visible.
Steps to Reproduce BehaviorCompile and run the following code using an install of Visual Studio 6.0 that has not had Service Pack 3 applied:REFERENCES
For support information about Visual J++ and the SDK for Java, visit the following Microsoft Web site:
http://www.microsoft.com/java
(http://www.microsoft.com/java)
| Article Translations
|
Back to the top
