Originally posted by: dspellman
I have written an ocx that uses the richedit control in a dialog box, but when I try to register it on a machine that does not have the compiler installed, I get an error message (0x0000045a) that says the rich edit dll can't be loaded. The operating system is Windows NT 4.0, and all three richedit dlls are in the system32 directory. Does anyone know what I am missing that the compiler environment has installed?
ReplyOriginally posted by: Joel Harrison
Has anyone had any luck in hooking in RichEdit 3.0? The DLL name is the same as RichEdit 2.0 but the file sizes are different and there are many new features. We I try it on a SDI it works fine, but on a MDI a "First-chance exception in RichEdit.exe: 0xC0000005: Access Violation" each time I close one any of the Views using the newer DLL. Any suggestions would help.
Thanks
Joel
Originally posted by: Lee Ho Jin
I'm developing an editor using CRichEditView, and
I changed Library from RICHED.dll to RICHED20.dll.
Because I must determine what character is on the right-clicked position, I use EM_CHARFROMPOS. but, it works strangely...
Here is my code :
int CMyView::CharFromPos(CPoint point)
{
POINT pt;
pt.x = point.x;
pt.y = point.y;
WPARAM wParam = 0; // not used
LPARAM lParam = (LPARAM) (POINTL *) &pt;
LRESULT result = GetRichEditCtrl().SendMessage(
EM_CHARFROMPOS, wParam, lParam);
return (int) result;
}
I passed CPoint object to above function in CMyView::OnRButtonDown()...
But... returned index and the character I clicked doesn't match...!!!! why? assuming that the screen display "RICHEDIT', when I pressed mouse-button on 'H', the returned index indicates prev char... 'C' or 'I'; The function return right index in one case - the sentence I clicked is first line in the richedit control. I don't why...!! It worked under RICHED.dll(richedit 1.0) but not now..
Somebody help me..
Originally posted by: Pat Lynch
Does anyone know if there's any documentation available for riched20.dll for windows CE??
regards,
Pat Lynch.
Originally posted by: Sascha Fraembs
The example only opend my C:\ folder when I added a link and clicked on it. After a little code browsing I found that the code inside of the switch statement in the function CMainDialog::OnRichEditExLink, should be: l_URL = m_RichEditEx.GetSelText() instead of l_URL = m_RichEdit.GetSelText(). I guess most of you would have figured this out for yourself, but this way it might just save you some time.
ReplyOriginally posted by: don grasberger
I've added a custom build of a text file to replace all "RICHEDIT" in
Finally, the code as posted is not Unicode ready. Since MFC includes
#undef RICHEDIT_CLASS
and use the RICHEDIT_CLASS macro instead of "RichEdit20A" in the
Besides the EM_POSFROMCHAR doc error, the REQRESIZE structure seems to
request a smaller rectangle than richedit v1. Also, if you use richedit
controls in dialogs, you'll end up loading both v1 and v2 dlls.
an RC file with "RichEdit20A" and use the resulting file for builds
instead of the original.
force use of richedit v1, after they'e all done, you should do
something like
#ifdef UNICODE
#define RICHEDIT_CLASS RICHEDIT_CLASSW
#else
#define RICHEDIT_CLASS RICHEDIT_CLASSA
#endif /* UNICODE */
::Create() function
Originally posted by: Ross Faneuf
I have done something quite similar to use Rich EditV2.0. You can extend the code given in a fairly obvious way to make sure the supporting .dll is actually installed, which our app does for safety.
In addition, should you use the functions, note that the EM_POSFROMCHAR and EM_CHARFROMPOS have different APIs for V2.0 and V1.0, and the built-in MFC support is for V1.0. Se article ID Q137805 in the msdg library, or just search for EM_POSFROMCHAR.
Reply