Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RTF control issues
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01352189
Message ID:
01352447
Views:
19
Hi Cyril,

>I'm not using the RTF control for reports - I'm just using it for the user to enter notes into a memo field.
>The reports is run via another form (i.e. nothing to do with the RTF form).
>
>What is weird is that just running the reports (via Crystal 9 runtimes) causes the RTF control on another form in a private data session to have problems. Why would Crystal reports interfere?

How are you calling Crystal from VFP? I mostly curious if it is running in the same process as VFP or in it's own process.

If the control is on a modal window, it may have something to do with the bug Christof mentions here (http://www.foxpert.com/knowlbits_200801_1.htm) However, I would think that closing the form and reopening it should get rid of the problem.

If it is in the same process, Crystal could be hosing Window's internal RTF Edit window control. Possibly by forcing a callback pointer to Crystal.

You may try unloading any dangling rtf dll references and see if that clears it up. Try running this code after invoking Crystal and closing any VFP form with an RTF control in it. There should be zero references. (IMPORTANT: If you have an RTF form open when you run this code it WILL crash VFP)
DECLARE long LoadLibrary IN WIN32API String
DECLARE long FreeLibrary IN WIN32API Long

hMSed = LoadLibrary("msftedit.dll")
hREd = LoadLibrary("riched20.dll")
nMSEdCnt = 0
nREdCnt = 0

DO WHILE FreeLibrary(hMSed) <> 0
   nMSEdCnt = nMSEdCnt + 1
ENDDO

DO WHILE FreeLibrary(hREd) <> 0
   nREdCnt = nREdCnt + 1
ENDDO

MESSAGEBOX("msftedit.dll was already loaded " + TRANSFORM(nMSEdCnt-1) + " times"+CHR(13) ;
      +"riched20.dll was already loaded " + TRANSFORM(nREdCnt-1) + " times"+CHR(13))
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform