Click to See Complete Forum and Search --> : problem setting up use of RichEdit 2.0 in an SDI


chris
October 3rd, 1999, 03:18 PM
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,
cbobo@ufl.edu

Chris
October 3rd, 1999, 03:18 PM
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,
cbobo@ufl.edu

chris
October 3rd, 1999, 05:28 PM
IDS_RICHED_LOAD_FAIL is a user defined string.
Now I just have to figure out how to use the RichEdit controls, hehe...

Chris
October 3rd, 1999, 05:28 PM
IDS_RICHED_LOAD_FAIL is a user defined string.
Now I just have to figure out how to use the RichEdit controls, hehe...