Article ID: 166132
Article Last Modified on 11/21/2006
APPLIES TO
- Microsoft Foundation Class Library 4.2, when used with:
- Microsoft Visual C++ 5.0 Enterprise Edition
- Microsoft Visual C++ 5.0 Professional Edition
- Microsoft Visual C++ 6.0 Enterprise Edition
- Microsoft Visual C++ 6.0 Professional Edition
- Microsoft Visual C++ 6.0 Standard Edition
This article was previously published under Q166132
SYMPTOMS
Dialog creation may fail if the dialog template has a Rich
Edit control in it. This template may be used in a dialog, CformView, or
property page.
The following error messages may appear in the IDE
output window when you execute the program in the debugger with the debug
build. No error message or warning is given if you execute the program outside
the debugger or with the release build.
Dialog or Property Page
Visual C++ 5.0:
Warning: Dialog creation failed!
Visual C++ 6.0:
If this dialog has OLE controls:
AfxEnableControlContainer has not been called yet.
You should call it in your app's InitInstance function.
CFormView
Visual C++ 5.0:
Warning: Dialog creation failed!
Warning: could not create view for frame.
Failed to create client pane/view for frame.
Warning: CDocTemplate couldn't create a frame.
Visual C++ 6.0:
If this dialog has OLE controls:
AfxEnableControlContainer has not been called yet.
You should call it in your app's InitInstance function.
In the case of a CformView, the following message also
appears:
Failed to create empty document.
CAUSE
The Rich Edit control is not initialized.
RESOLUTION
Call the MFC global function AfxInitRichEdit before you
create the dialog to initialize the Rich Edit Control. A good place to
initialize the Rich Edit control is in the application's InitInstance function
before you create the dialog.
STATUS
This behavior is by design.
Additional query words: CreatDialogIndirect DoModal RichEdit CFormView
Keywords: kbtshoot kbdlg kberrmsg kbprb kbrichedit kbuidesign KB166132