Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Property ppParentWnd removed from TppStretchable ReportBuilder 7 enterprise

edited October 2002 in General
I noticed ppParentWnd property was removed from TppStretchable in
reportbuilder 7 when i tried to compile wptools reportbuilder tools.

What was exactly this property and could that be the reason why i cant
print my WPTRichText.

Frederic.

Comments

  • edited October 2002


    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
  • edited October 2002
    I tested first method and it had exact same effect as my first try.



  • edited October 2002

    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
This discussion has been closed.