Page 1 of 1

RVCANUSEFORMS from RV_Defs.inc problem

Posted: Thu Aug 21, 2025 1:37 am
by jgkoehn
Greetings Sergey,
We had to rebuild some various components of RichView because we had to do some editing for our own needs.
For some reason in RVSpellFormUtils.pas

This will not turn on even though RVCANUSEFORMS is set in RV_Defs.inc and we are not in FMX but in VCL.

Code: Select all

{$IFnDEF RVMOBILE}{$IFDEF RVCANUSEFORMS}
uses
  Classes,
  {$IFDEF FIREMONKEY}
    FMX.Forms, fmxRVCustomSpellFrmFM, fmxRVSpellFrmFM, fmxRVSpellWordFrmFM,
  {$ELSE}
    Forms,
    {$IFDEF USERVTNT}
    RVTntCustomSpellFrm, RVTntSpellFrm, RVTntSpellWordFrm,
    {$ELSE}
    RVCustomSpellFrm, RVSpellFrm, RVSpellWordFrm,
    {$ENDIF}
  {$ENDIF}
  RVStyle, RVTypes;

type
  TRVSpellFormStyle = (rvspellfrmClassic, rvspellfrmMSWord);

  {$IFDEF USERVTNT}
  TfrmRVCustomSpell_ = TfrmRVTntCustomSpell;
  TfrmRVSpell_ = TfrmRVTntSpell;
  TfrmRVSpellWord_ = TfrmRVTntSpellWord;
  {$ELSE}
  TfrmRVCustomSpell_ = TfrmRVCustomSpell;
  TfrmRVSpell_ = TfrmRVSpell;
  TfrmRVSpellWord_ = TfrmRVSpellWord;
  {$ENDIF}


procedure CreateSpellForm(SpellFormStyle: TRVSpellFormStyle;
  var frm: TfrmRVCustomSpell_);
procedure BeforeShowSpellForm(
  const AWord, AText: TRVUnicodeString;
  StartOffs, EndOffs: Integer; frm: TfrmRVCustomSpell_; TextStyle: TFontInfo;
  SupportsAutoReplacement: Boolean = True;
  SupportsIgnoreAll: Boolean = True;
  SupportsAdd: Boolean = True);

{$ENDIF}{$ENDIF}


For now I have added to the top of RVSpellFormUtils.pas but I know it is not the right way to do it.
Ideas to the reason for this problem?

Code: Select all

{$IFDEF FIREMONKEY}
  {$IFDEF RICHVIEWDEFXE7}
    {$DEFINE RVCANUSEFORMS}
  {$ENDIF}
{$ELSE}
     {$DEFINE RVCANUSEFORMS}
{$ENDIF}

Re: RVCANUSEFORMS from RV_Defs.inc problem

Posted: Thu Aug 21, 2025 4:27 pm
by Sergey Tkachenko
Probably you have an old copy of obsolete RV_Defs.inc file somewhere. Find it and delete.