CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    Trouble with RichEdit

    Hello world,

    I have a "dialog based" MFC application that was originally created with Visual C++ 4.0 and has gone through 5.0 to 6.0 SP-2.
    Each time I try to include a rich edit control in my main dialog (just dragged in with the dialog editor, no additional programming), the programm will compile fine but cause a "debug assertion failed" when it is started.
    If I include a rich dit control in any other dialog (e. g. the "about" dialog), this dialog will not be displayed when called at runtime. Anything works fine again when I remove the rich edit control.

    I have absolutely no idea why this happens. Is there any known problem with the rich edit control? Or am I doing something wrong?

    Who can help?

    Jens
    [email protected]


  2. #2
    Guest

    Re: Trouble with RichEdit

    Dialog resources uses a DIALOG structure. When you put a RichEdit control into dialog using the Resource Editor it causes the dialog resource to the the DIALOGEX structure. The CDialog class currently does not support the DIALOGEX structure and this causes the dialog not to by displayed when certain controls are used. To fix the problem, create the RichEdit controls in your dialog's OnInitDialog function.


  3. #3
    Join Date
    Apr 1999
    Posts
    396

    Re: Trouble with RichEdit

    The real answer is this. Call AfxInitRichEdit() in your CWinApp::InitInstance


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured