I've just converted from 5.10 to 5.12 and now when using LoadFromFile I'm getting 1,242,437 pages created in TWPToolsEditor.
It was working 5.10
I'm creating the editor in a DLL, here is my code:
---------------------------------------------------------------------------
library WCEditor;
uses
SysUtils, Controls,
Forms, WPRTEDefs,
Classes,
wpDefEditor;
var
DocEditor : TWPToolsEditor;
function ShowPreview(AHandle: THandle; ACaption, FileName: pchar; GetVal, SetVal: pointer): Longint; stdcall;
begin
Application.Handle := AHandle;
if DocEditor = nil then
DocEditor := TWPToolsEditor.Create(nil);
with DocEditor do begin
Caption := ACaption;
WPRichText.LoadFromFile(FileName, true);
WPRichText.ClickableCodes := [wpobjMergeField];
ShowModal;
Application.Handle := 0;
end;
end;
exports
ShowPreview;
begin
end.
While debugging, the file load up quickly but on the ShowModal command it pauses and creates the 1mil+ pages.
Can someone give me an idea of where to start looking?
Thanks!
Mike