CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 1999
    Location
    Fl, USA
    Posts
    23

    problem setting up use of RichEdit 2.0 in an SDI

    I am trying to use RichEdit 2.0, After using code from this site I got and undeclared identifier error for IDS_RICHED_LOAD_FAIL, here is the code for this section :

    void CBoboEditView::OnInitialUpdate()
    {
    CRichEditView::OnInitialUpdate();

    // Add these lines
    // Initialize RichEdit 2.0 control
    if(LoadLibraryA(_T("RICHED20.DLL"))==NULL)
    {
    AfxMessageBox(IDS_RICHED_LOAD_FAIL, MB_OK|MB_ICONEXCLAMATION);
    // return FALSE;
    }
    // End of modifications

    // Set the printing margins (720 twips = 1/2 inch).
    SetMargins(CRect(720, 720, 720, 720));
    }

    I looked up the RichEdit 2.0 in the msdn library but it doesnt list a header file to include and the example on this site doesnt list any headers to include.

    Also on this site the example code places the above lines into the InitInstance function. I am assuming that this is for an MDI application and that the code belongs in OnInitialUpdate for an SDI.


    Thanks for the help,
    [email protected]


  2. #2
    Join Date
    Mar 1999
    Location
    Fl, USA
    Posts
    23

    problem setting up use of RichEdit 2.0 in an SDI

    I am trying to use RichEdit 2.0, After using code from this site I got and undeclared identifier error for IDS_RICHED_LOAD_FAIL, here is the code for this section :

    void CBoboEditView::OnInitialUpdate()
    {
    CRichEditView::OnInitialUpdate();

    // Add these lines
    // Initialize RichEdit 2.0 control
    if(LoadLibraryA(_T("RICHED20.DLL"))==NULL)
    {
    AfxMessageBox(IDS_RICHED_LOAD_FAIL, MB_OK|MB_ICONEXCLAMATION);
    // return FALSE;
    }
    // End of modifications

    // Set the printing margins (720 twips = 1/2 inch).
    SetMargins(CRect(720, 720, 720, 720));
    }

    I looked up the RichEdit 2.0 in the msdn library but it doesnt list a header file to include and the example on this site doesnt list any headers to include.

    Also on this site the example code places the above lines into the InitInstance function. I am assuming that this is for an MDI application and that the code belongs in OnInitialUpdate for an SDI.


    Thanks for the help,
    [email protected]


  3. #3
    Join Date
    Mar 1999
    Location
    Fl, USA
    Posts
    23

    I figured the problem out...

    IDS_RICHED_LOAD_FAIL is a user defined string.
    Now I just have to figure out how to use the RichEdit controls, hehe...




  4. #4
    Join Date
    Mar 1999
    Location
    Fl, USA
    Posts
    23

    I figured the problem out...

    IDS_RICHED_LOAD_FAIL is a user defined string.
    Now I just have to figure out how to use the RichEdit controls, hehe...




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