Access Violation in TWPRTFTextPaint.SetGlobalVar

  • I am running WpTools4.11d in an Delphi 4 environment and am getting an intermittent access Violation in WPRTFTextPaint.SetGlobalVar
    (about 1 times out of 12) in the process of flushing and inserting text into a temporary WpRichText control. I am using the code below to search out custom mail merge tags and replace them with content.

    -- the calling program does a FastClear on TempRichText before calling


    Any suggestions? Sorry about the formatting, the indents seem to have gotten lost somewhere along the way.

    Dave Henrickson

    • Offizieller Beitrag

    I suggest to do a BeginUpdate/EndUpdate around the complete procedure - this avoids any reformat and painting and so also the problem with SetGlobalVar

    Instead of SelText := '' you can also do a ClearSelection.