ReportBuilder 7 no longer includes the global ppParentWnd due to modifications required for thread-safety.
You have two choices:
1. Modify TWPCustomRichTextForPP (or create a descendant class). Override the CreateParams as shown below. CreateParams is a protected method of TWinControl. (note: This is the approach that RB uses so that RichText can be thread-safe for RB Server.)
procedure TWPCustomRichTextForPP.CreateParams(var Params: TCreateParams); begin
inherited CreateParams(Params);
{remove ws-child so that no parent window is required} Params.Style := Params.Style and not(WS_CHILD);
end; {procedure, CreateParams}
2. Create an invisble form and use that as the parent. (note: This is not thread-safe).
Best regards,
Nard Moseley Digital Metaphors www.digital-metaphors.com
1. Modify the TWPCustomRichTextForPP code as I described.
2. Remove references to ppParentWnd from your code. The change in 1 above enables a WinControl descendant to be created without assigning the Parent property. If WPTools contains some code the depends upon the Parent being non nil then this may not work. However it does work for Delphi's RichEdit and for TeeChart.
Comments
ReportBuilder 7 no longer includes the global ppParentWnd due to
modifications required for thread-safety.
You have two choices:
1. Modify TWPCustomRichTextForPP (or create a descendant class).
Override the CreateParams as shown below. CreateParams is a protected
method of TWinControl. (note: This is the approach that RB uses so that
RichText can be thread-safe for RB Server.)
procedure TWPCustomRichTextForPP.CreateParams(var Params:
TCreateParams);
begin
inherited CreateParams(Params);
{remove ws-child so that no parent window is required}
Params.Style := Params.Style and not(WS_CHILD);
end; {procedure, CreateParams}
2. Create an invisble form and use that as the parent. (note: This is
not thread-safe).
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Perhaps I was not clear.
1. Modify the TWPCustomRichTextForPP code as I described.
2. Remove references to ppParentWnd from your code. The change in 1 above
enables a WinControl descendant to be created without assigning the Parent
property. If WPTools contains some code the depends upon the Parent being
non nil then this may not work. However it does work for Delphi's RichEdit
and for TeeChart.
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com