RtfLabel, Version 1.3a (alt)

Hinweis: dies ist nicht die neueste Version!

Zurück zur Übersicht

Datei: RichEdit2.pas

{
  RichEdit2.pas

  Pascal version of richedit.h (version: 2005 platform SDK - only stuff missing
  from the original RichEdit.pas, verified for Delphi versions 5 to 10).

  Version 1.3 - always find the most current version at
  http://flocke.vssd.de/prog/code/pascal/rtflabel/

  Copyright (C) 2001-2006 Volker Siebert <flocke@vssd.de>
  All rights reserved.

  Permission is hereby granted, free of charge, to any person obtaining a
  copy of this software and associated documentation files (the "Software"),
  to deal in the Software without restriction, including without limitation
  the rights to use, copy, modify, merge, publish, distribute, sublicense,
  and/or sell copies of the Software, and to permit persons to whom the
  Software is furnished to do so, subject to the following conditions:

  The above copyright notice and this permission notice shall be included in
  all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  DEALINGS IN THE SOFTWARE.
}

unit RichEdit2;

{$WEAKPACKAGEUNIT}
{$ALIGN 4}
{$MINENUMSIZE 4}

interface

uses
  Messages, Windows, RichEdit;

(*
 *      RICHEDIT.H
 *
 *      Purpose:
 *              RICHEDIT v2.0/3.0/4.0 public definitions
 *              functionality available for v2.0 and 3.0 that is not in the original
 *              Windows 95 release.
 *
 *      Copyright (c) Microsoft Corporation. All rights reserved.
 *)

const
  // NOTE:  MSFTEDIT.DLL only registers MSFTEDIT_CLASS.  If an application wants
  // to use the following Richedit classes, it needs to load the riched20.dll.
  // Otherwise, CreateWindow with RICHEDIT_CLASS would fail.
  // This also applies to any dialog that uses RICHEDIT_CLASS,
  MSFTEDIT_CLASS = 'RICHEDIT50W';

  // RichEdit messages
  {$EXTERNALSYM WM_UNICHAR}
  WM_UNICHAR                    = $0109;

  {$EXTERNALSYM EM_SHOWSCROLLBAR}
  EM_SHOWSCROLLBAR              = WM_USER + 96;
  {$EXTERNALSYM EM_SETTEXTEX}
  EM_SETTEXTEX                  = WM_USER + 97;

  {$EXTERNALSYM EM_FINDTEXTW}
  EM_FINDTEXTW                  = WM_USER + 123;
  {$EXTERNALSYM EM_FINDTEXTEXW}
  EM_FINDTEXTEXW                = WM_USER + 124;

  // RE3.0 FE messages
  {$EXTERNALSYM EM_RECONVERSION}
  EM_RECONVERSION               = WM_USER + 125;
  {$EXTERNALSYM EM_SETIMEMODEBIAS}
  EM_SETIMEMODEBIAS             = WM_USER + 126;
  {$EXTERNALSYM EM_GETIMEMODEBIAS}
  EM_GETIMEMODEBIAS             = WM_USER + 127;

  // BiDi specific messages
  {$EXTERNALSYM EM_SETBIDIOPTIONS}
  EM_SETBIDIOPTIONS             = WM_USER + 200;
  {$EXTERNALSYM EM_GETBIDIOPTIONS}
  EM_GETBIDIOPTIONS             = WM_USER + 201;

  {$EXTERNALSYM EM_SETTYPOGRAPHYOPTIONS}
  EM_SETTYPOGRAPHYOPTIONS       = WM_USER + 202;
  {$EXTERNALSYM EM_GETTYPOGRAPHYOPTIONS}
  EM_GETTYPOGRAPHYOPTIONS       = WM_USER + 203;

  // Extended edit style specific messages
  {$EXTERNALSYM EM_SETEDITSTYLE}
  EM_SETEDITSTYLE               = WM_USER + 204;
  {$EXTERNALSYM EM_GETEDITSTYLE}
  EM_GETEDITSTYLE               = WM_USER + 205;

  // Extended edit style masks
  {$EXTERNALSYM SES_EMULATESYSEDIT}
  SES_EMULATESYSEDIT            = 1;
  {$EXTERNALSYM SES_BEEPONMAXTEXT}
  SES_BEEPONMAXTEXT             = 2;
  {$EXTERNALSYM SES_EXTENDBACKCOLOR}
  SES_EXTENDBACKCOLOR           = 4;
  {$EXTERNALSYM SES_MAPCPS}
  SES_MAPCPS                    = 8;
  {$EXTERNALSYM SES_EMULATE10}
  SES_EMULATE10                 = 16;
  {$EXTERNALSYM SES_USECRLF}
  SES_USECRLF                   = 32;
  {$EXTERNALSYM SES_USEAIMM}
  SES_USEAIMM                   = 64;
  {$EXTERNALSYM SES_NOIME}
  SES_NOIME                     = 128;

  {$EXTERNALSYM SES_ALLOWBEEPS}
  SES_ALLOWBEEPS                = 256;
  {$EXTERNALSYM SES_UPPERCASE}
  SES_UPPERCASE                 = 512;
  {$EXTERNALSYM SES_LOWERCASE}
  SES_LOWERCASE                 = 1024;
  {$EXTERNALSYM SES_NOINPUTSEQUENCECHK}
  SES_NOINPUTSEQUENCECHK        = 2048;
  {$EXTERNALSYM SES_BIDI}
  SES_BIDI                      = 4096;
  {$EXTERNALSYM SES_SCROLLONKILLFOCUS}
  SES_SCROLLONKILLFOCUS         = 8192;
  {$EXTERNALSYM SES_XLTCRCRLFTOCR}
  SES_XLTCRCRLFTOCR             = 16384;
  {$EXTERNALSYM SES_DRAFTMODE}
  SES_DRAFTMODE                 = 32768;

  {$EXTERNALSYM SES_USECTF}
  SES_USECTF                    = $0010000;
  {$EXTERNALSYM SES_HIDEGRIDLINES}
  SES_HIDEGRIDLINES             = $0020000;
  {$EXTERNALSYM SES_USEATFONT}
  SES_USEATFONT                 = $0040000;
  {$EXTERNALSYM SES_CUSTOMLOOK}
  SES_CUSTOMLOOK                = $0080000;
  {$EXTERNALSYM SES_LBSCROLLNOTIFY}
  SES_LBSCROLLNOTIFY            = $0100000;
  {$EXTERNALSYM SES_CTFALLOWEMBED}
  SES_CTFALLOWEMBED             = $0200000;
  {$EXTERNALSYM SES_CTFALLOWSMARTTAG}
  SES_CTFALLOWSMARTTAG          = $0400000;
  {$EXTERNALSYM SES_CTFALLOWPROOFING}
  SES_CTFALLOWPROOFING          = $0800000;

  // Options for EM_SETLANGOPTIONS and EM_GETLANGOPTIONS
  {$EXTERNALSYM IMF_AUTOFONTSIZEADJUST}
  IMF_AUTOFONTSIZEADJUST        = $0010;
  {$EXTERNALSYM IMF_UIFONTS}
  IMF_UIFONTS                   = $0020;
  {$EXTERNALSYM IMF_DUALFONT}
  IMF_DUALFONT                  = $0080;

  // Values for EM_GETIMECOMPMODE
  {$EXTERNALSYM ICM_CTF}
  ICM_CTF                       = $0005;

  // Options for EM_SETTYPOGRAPHYOPTIONS
  {$EXTERNALSYM TO_ADVANCEDTYPOGRAPHY}
  TO_ADVANCEDTYPOGRAPHY         = 1;
  {$EXTERNALSYM TO_SIMPLELINEBREAK}
  TO_SIMPLELINEBREAK            = 2;
  {$EXTERNALSYM TO_DISABLECUSTOMTEXTOUT}
  TO_DISABLECUSTOMTEXTOUT       = 4;
  {$EXTERNALSYM TO_ADVANCEDLAYOUT}
  TO_ADVANCEDLAYOUT             = 8;

  // Pegasus outline mode messages (RE 3.0)

  // Outline mode message
  {$EXTERNALSYM EM_OUTLINE}
  EM_OUTLINE                    = WM_USER + 220;
  // Message for getting and restoring scroll pos
  {$EXTERNALSYM EM_GETSCROLLPOS}
  EM_GETSCROLLPOS               = WM_USER + 221;
  {$EXTERNALSYM EM_SETSCROLLPOS}
  EM_SETSCROLLPOS               = WM_USER + 222;
  // Change fontsize in current selection by wParam
  {$EXTERNALSYM EM_SETFONTSIZE}
  EM_SETFONTSIZE                = WM_USER + 223;
  {$EXTERNALSYM EM_GETZOOM}
  EM_GETZOOM                    = WM_USER + 224;
  {$EXTERNALSYM EM_SETZOOM}
  EM_SETZOOM                    = WM_USER + 225;
  {$EXTERNALSYM EM_GETVIEWKIND}
  EM_GETVIEWKIND                = WM_USER + 226;
  {$EXTERNALSYM EM_SETVIEWKIND}
  EM_SETVIEWKIND                = WM_USER + 227;

  // RichEdit 4.0 messages
  {$EXTERNALSYM EM_GETPAGE}
  EM_GETPAGE                    = WM_USER + 228;
  {$EXTERNALSYM EM_SETPAGE}
  EM_SETPAGE                    = WM_USER + 229;
  {$EXTERNALSYM EM_GETHYPHENATEINFO}
  EM_GETHYPHENATEINFO           = WM_USER + 230;
  {$EXTERNALSYM EM_SETHYPHENATEINFO}
  EM_SETHYPHENATEINFO           = WM_USER + 231;
  {$EXTERNALSYM EM_GETPAGEROTATE}
  EM_GETPAGEROTATE              = WM_USER + 235;
  {$EXTERNALSYM EM_SETPAGEROTATE}
  EM_SETPAGEROTATE              = WM_USER + 236;
  {$EXTERNALSYM EM_GETCTFMODEBIAS}
  EM_GETCTFMODEBIAS             = WM_USER + 237;
  {$EXTERNALSYM EM_SETCTFMODEBIAS}
  EM_SETCTFMODEBIAS             = WM_USER + 238;
  {$EXTERNALSYM EM_GETCTFOPENSTATUS}
  EM_GETCTFOPENSTATUS           = WM_USER + 240;
  {$EXTERNALSYM EM_SETCTFOPENSTATUS}
  EM_SETCTFOPENSTATUS           = WM_USER + 241;
  {$EXTERNALSYM EM_GETIMECOMPTEXT}
  EM_GETIMECOMPTEXT             = WM_USER + 242;
  {$EXTERNALSYM EM_ISIME}
  EM_ISIME                      = WM_USER + 243;
  {$EXTERNALSYM EM_GETIMEPROPERTY}
  EM_GETIMEPROPERTY             = WM_USER + 244;

  // These messages control what rich edit does when it comes accross
  // OLE objects during RTF stream in.  Normally rich edit queries the client
  // application only after OleLoad has been called.  With these messages it is possible to
  // set the rich edit control to a mode where it will query the client application before
  // OleLoad is called
  {$EXTERNALSYM EM_GETQUERYRTFOBJ}
  EM_GETQUERYRTFOBJ             = WM_USER + 269;
  {$EXTERNALSYM EM_SETQUERYRTFOBJ}
  EM_SETQUERYRTFOBJ             = WM_USER + 270;

  // EM_SETPAGEROTATE wparam values
  {$EXTERNALSYM EPR_0}
  EPR_0                         = 0;    // Text flows left to right and top to bottom
  {$EXTERNALSYM EPR_270}
  EPR_270                       = 1;    // Text flows top to bottom and right to left
  {$EXTERNALSYM EPR_180}
  EPR_180                       = 2;    // Text flows right to left and bottom to top
  {$EXTERNALSYM EPR_90}
  EPR_90                        = 3;    // Text flows bottom to top and left to right

  // EM_SETCTFMODEBIAS wparam values
  {$EXTERNALSYM CTFMODEBIAS_DEFAULT}
  CTFMODEBIAS_DEFAULT                   = $0000;
  {$EXTERNALSYM CTFMODEBIAS_FILENAME}
  CTFMODEBIAS_FILENAME                  = $0001;
  {$EXTERNALSYM CTFMODEBIAS_NAME}
  CTFMODEBIAS_NAME                      = $0002;
  {$EXTERNALSYM CTFMODEBIAS_READING}
  CTFMODEBIAS_READING                   = $0003;
  {$EXTERNALSYM CTFMODEBIAS_DATETIME}
  CTFMODEBIAS_DATETIME                  = $0004;
  {$EXTERNALSYM CTFMODEBIAS_CONVERSATION}
  CTFMODEBIAS_CONVERSATION              = $0005;
  {$EXTERNALSYM CTFMODEBIAS_NUMERIC}
  CTFMODEBIAS_NUMERIC                   = $0006;
  {$EXTERNALSYM CTFMODEBIAS_HIRAGANA}
  CTFMODEBIAS_HIRAGANA                  = $0007;
  {$EXTERNALSYM CTFMODEBIAS_KATAKANA}
  CTFMODEBIAS_KATAKANA                  = $0008;
  {$EXTERNALSYM CTFMODEBIAS_HANGUL}
  CTFMODEBIAS_HANGUL                    = $0009;
  {$EXTERNALSYM CTFMODEBIAS_HALFWIDTHKATAKANA}
  CTFMODEBIAS_HALFWIDTHKATAKANA         = $000A;
  {$EXTERNALSYM CTFMODEBIAS_FULLWIDTHALPHANUMERIC}
  CTFMODEBIAS_FULLWIDTHALPHANUMERIC     = $000B;
  {$EXTERNALSYM CTFMODEBIAS_HALFWIDTHALPHANUMERIC}
  CTFMODEBIAS_HALFWIDTHALPHANUMERIC     = $000C;

  // EM_SETIMEMODEBIAS lparam values
  {$EXTERNALSYM IMF_SMODE_PLAURALCLAUSE}
  IMF_SMODE_PLAURALCLAUSE               = $0001;
  {$EXTERNALSYM IMF_SMODE_NONE}
  IMF_SMODE_NONE                        = $0002;

type
  // EM_GETIMECOMPTEXT wparam structure
  {$EXTERNALSYM _IMECOMPTEXT}
  _IMECOMPTEXT = record
    cb: LongInt;     // count of bytes in the output buffer.
    flags: DWORD;    // value specifying the composition string type.
                     // Currently only support ICT_RESULTREADSTR
  end;
  {$EXTERNALSYM IMECOMPTEXT}
  IMECOMPTEXT = _IMECOMPTEXT;
  TImeCompText = _IMECOMPTEXT;

const
  {$EXTERNALSYM ICT_RESULTREADSTR}
  ICT_RESULTREADSTR     = 1;

  // Outline mode wparam values
  {$EXTERNALSYM EMO_EXIT}
  EMO_EXIT              = 0;    // Enter normal mode,  lparam ignored
  {$EXTERNALSYM EMO_ENTER}
  EMO_ENTER             = 1;    // Enter outline mode, lparam ignored
  {$EXTERNALSYM EMO_PROMOTE}
  EMO_PROMOTE           = 2;    // LOWORD(lparam) == 0 ==>
                                //  promote  to body-text
                                // LOWORD(lparam) != 0 ==>
                                //  promote/demote current selection
                                //  by indicated number of levels
  {$EXTERNALSYM EMO_EXPAND}
  EMO_EXPAND            = 3;    // HIWORD(lparam) = EMO_EXPANDSELECTION
                                //  -> expands selection to level
                                //  indicated in LOWORD(lparam)
                                //  LOWORD(lparam) = -1/+1 corresponds
                                //  to collapse/expand button presses
                                //  in winword (other values are
                                //  equivalent to having pressed these
                                //  buttons more than once)
                                //  HIWORD(lparam) = EMO_EXPANDDOCUMENT
                                //  -> expands whole document to
                                //  indicated level
  {$EXTERNALSYM EMO_MOVESELECTION}
  EMO_MOVESELECTION     = 4;    // LOWORD(lparam) != 0 -> move current
                                //  selection up/down by indicated amount
  {$EXTERNALSYM EMO_GETVIEWMODE}
  EMO_GETVIEWMODE       = 5;    // Returns VM_NORMAL or VM_OUTLINE

  // EMO_EXPAND options
  {$EXTERNALSYM EMO_EXPANDSELECTION}
  EMO_EXPANDSELECTION   = 0;
  {$EXTERNALSYM EMO_EXPANDDOCUMENT}
  EMO_EXPANDDOCUMENT    = 1;

  {$EXTERNALSYM VM_NORMAL}
  VM_NORMAL             = 4;    // Agrees with RTF \viewkindN
  {$EXTERNALSYM VM_OUTLINE}
  VM_OUTLINE            = 2;
  {$EXTERNALSYM VM_PAGE}
  VM_PAGE               = 9;    // Screen page view (not print layout)

  // New notifications
  {$EXTERNALSYM EN_PARAGRAPHEXPANDED}
  EN_PARAGRAPHEXPANDED  = $070d;
  {$EXTERNALSYM EN_PAGECHANGE}
  EN_PAGECHANGE         = $070e;
  {$EXTERNALSYM EN_LOWFIRTF}
  EN_LOWFIRTF           = $070f;
  {$EXTERNALSYM EN_ALIGNLTR}
  EN_ALIGNLTR           = $0710;        // BiDi specific notification
  {$EXTERNALSYM EN_ALIGNRTL}
  EN_ALIGNRTL           = $0711;        // BiDi specific notification

  // Event notification masks
  {$EXTERNALSYM ENM_PARAGRAPHEXPANDED}
  ENM_PARAGRAPHEXPANDED = $00000020;
  {$EXTERNALSYM ENM_PAGECHANGE}
  ENM_PAGECHANGE        = $00000040;
  {$EXTERNALSYM ENM_LOWFIRTF}
  ENM_LOWFIRTF          = $08000000;

type
  PCharFormatA = ^TCharFormatA;
  PCharFormatW = ^TCharFormatW;
  PCharFormat = ^TCharFormat;
  PParaFormat = ^TParaFormat;

type
  { !?! ATTENTION: The definition of CHARFORMAT2A and CHARFORMAT2W in
    !?! richedit.h (2005 SDK) has an error in the C part (not C++)!
    !?!
    !?! The fields `wWeight´ and `sSpacing´ are not aligned correctly in C.
    !?! The reason for this is the way the structure is defined for C++: the
    !?! base types CHARFORMAT[AW] have `real´ sizes of $3A resp. $52. These
    !?! are rounded to $3C resp. $54 due to a structure alignment of 4 (which
    !?! are the values you get with `sizeof´).
    !?!
    !?! For C++ these structures are expanded in an OOP-like way by
    !?!   struct CHARFORMAT2W : _charformatw ...
    !?!   struct CHARFORMAT2A : _charformata ...
    !?! which puts the next field `wWeight´ at offset $3C resp. $54.
    !?!
    !?! For C these structure are not expanded but all fields are redeclared.
    !?! Due to this fact, the field `wWeight´ gets the offset $3A resp. $52,
    !?! because a short field only needs an alignment of 2. The following
    !?! field `sSpacing´ is also badly aligned. The next field `crBackColor´
    !?! needs an alignment of 4, thus this and all following fields are
    !?! aligned correctly (as in C++).
    !?!
    !?! Following are the correct types to use with delphi. A new field
    !?! `_StructAlign´ has been added between the old structure CHARFORMAT[AW]
    !?! and the new 2.0 fields to get the required alignment.
  }
  {$EXTERNALSYM CHARFORMAT2A}
  CHARFORMAT2A = record
    cbSize: UINT;
    dwMask: DWORD;
    dwEffects: DWORD;
    yHeight: LongInt;
    yOffset: LongInt;           // > 0 for superscript, < 0 for subscript
    crTextColor: TColorRef;
    bCharSet: Byte;
    bPitchAndFamily: Byte;
    szFaceName: array [0 .. LF_FACESIZE - 1] of AnsiChar;
    _StructAlign: Word;         // !?! Alignment padding (read note above)
    wWeight: Word;              // Font weight (LOGFONT value)
    sSpacing: SmallInt;         // Amount to space between letters
    crBackColor: TColorRef;     // Background color
    lid: LCID;                  // Locale ID
    dwReserved: DWORD;          // Reserved. Must be 0
    sStyle: SmallInt;           // Style handle
    wKerning: Word;             // Twip size above which to kern char pair
    bUnderlineType: Byte;       // Underline type
    bAnimation: Byte;           // Animated text like marching ants
    bRevAuthor: Byte;           // Revision author index
    bReserved1: Byte;           // Fill up to even size
  end;

  {$EXTERNALSYM CHARFORMAT2W}
  CHARFORMAT2W = record
    cbSize: UINT;
    dwMask: DWORD;
    dwEffects: DWORD;
    yHeight: LongInt;
    yOffset: LongInt;           // > 0 for superscript, < 0 for subscript
    crTextColor: TColorRef;
    bCharSet: Byte;
    bPitchAndFamily: Byte;
    szFaceName: array [0 .. LF_FACESIZE - 1] of WideChar;
    _StructAlign: Word;         // !?! Alignment padding (read note above)
    wWeight: Word;              // Font weight (LOGFONT value)
    sSpacing: SmallInt;         // Amount to space between letters
    crBackColor: TColorRef;     // Background color
    lid: LCID;                  // Locale ID
    dwReserved: DWORD;          // Reserved. Must be 0
    sStyle: SmallInt;           // Style handle
    wKerning: Word;             // Twip size above which to kern char pair
    bUnderlineType: Byte;       // Underline type
    bAnimation: Byte;           // Animated text like marching ants
    bRevAuthor: Byte;           // Revision author index
    bReserved1: Byte;           // Fill up to even size
  end;

  {$EXTERNALSYM CHARFORMAT2}
  CHARFORMAT2 = CHARFORMAT2A;

  TCharFormat2A = CHARFORMAT2A;
  TCharFormat2W = CHARFORMAT2W;
  TCharFormat2 = TCharFormat2A;

const
  {!?! CHECK THIS: If the underline color us stored in the upper 4 bits
   !?! of "bUnderlineType", how can we have underline types above 16?
   !?!}
  // Underline types. RE 1.0 displays only CFU_UNDERLINE
  {$EXTERNALSYM CFU_UNDERLINETHICKLONGDASH}
  CFU_UNDERLINETHICKLONGDASH    = 18;   // (*) display as dash
  {$EXTERNALSYM CFU_UNDERLINETHICKDOTTED}
  CFU_UNDERLINETHICKDOTTED      = 17;   // (*) display as dot
  {$EXTERNALSYM CFU_UNDERLINETHICKDASHDOTDOT}
  CFU_UNDERLINETHICKDASHDOTDOT  = 16;   // (*) display as dash dot dot
  {$EXTERNALSYM CFU_UNDERLINETHICKDASHDOT}
  CFU_UNDERLINETHICKDASHDOT     = 15;   // (*) display as dash dot
  {$EXTERNALSYM CFU_UNDERLINETHICKDASH}
  CFU_UNDERLINETHICKDASH        = 14;   // (*) display as dash
  {$EXTERNALSYM CFU_UNDERLINELONGDASH}
  CFU_UNDERLINELONGDASH         = 13;   // (*) display as dash
  {$EXTERNALSYM CFU_UNDERLINEHEAVYWAVE}
  CFU_UNDERLINEHEAVYWAVE        = 12;   // (*) display as wave
  {$EXTERNALSYM CFU_UNDERLINEDOUBLEWAVE}
  CFU_UNDERLINEDOUBLEWAVE       = 11;   // (*) display as wave
  {$EXTERNALSYM CFU_UNDERLINEHAIRLINE}
  CFU_UNDERLINEHAIRLINE         = 10;   // (*) display as single
  {$EXTERNALSYM CFU_UNDERLINETHICK}
  CFU_UNDERLINETHICK            = 9;
  {$EXTERNALSYM CFU_UNDERLINEWAVE}
  CFU_UNDERLINEWAVE             = 8;
  {$EXTERNALSYM CFU_UNDERLINEDASHDOTDOT}
  CFU_UNDERLINEDASHDOTDOT       = 7;
  {$EXTERNALSYM CFU_UNDERLINEDASHDOT}
  CFU_UNDERLINEDASHDOT          = 6;
  {$EXTERNALSYM CFU_UNDERLINEDASH}
  CFU_UNDERLINEDASH             = 5;

  // EM_SETCHARFORMAT wParam masks
  {$EXTERNALSYM SCF_ASSOCIATEFONT}
  SCF_ASSOCIATEFONT     = $0010;  // Associate fontname with bCharSet (one
                                  //  possible for each of Western, ME, FE, Thai)
  {$EXTERNALSYM SCF_NOKBUPDATE}
  SCF_NOKBUPDATE        = $0020;  // Do not update KB layput for this change
                                  //  even if autokeyboard is on
  {$EXTERNALSYM SCF_ASSOCIATEFONT2}
  SCF_ASSOCIATEFONT2    = $0040;  // Associate plane-2 (surrogate) font

type
  PTextRange = ^TTextRange;
  TTextRange = TTextRangeA;
  
const
  // Stream formats. Flags are all in low word, since high word
  // gives possible codepage choice.
  {$EXTERNALSYM SF_USECODEPAGE}
  SF_USECODEPAGE        = $0020;  // CodePage given by high word
  {$EXTERNALSYM SF_NCRFORNONASCII}
  SF_NCRFORNONASCII     = $0040;  // Output /uN for nonASCII
  {$EXTERNALSYM SFF_WRITEXTRAPAR}
  SFF_WRITEXTRAPAR      = $0080;  // Output \par at end

  // Flag telling file stream output (SFF_SELECTION flag not set) to persist
  // \viewscaleN control word.
  {$EXTERNALSYM SFF_PERSISTVIEWSCALE}
  SFF_PERSISTVIEWSCALE  = $2000;

  // Flag telling file stream input with SFF_SELECTION flag not set not to
  // close the document
  {$EXTERNALSYM SFF_KEEPDOCINFO}
  SFF_KEEPDOCINFO       = $1000;

  // Flag telling stream operations to output in Pocket Word format
  {$EXTERNALSYM SFF_PWD}
  SFF_PWD               = $0800;

  // 3-bit field specifying the value of N - 1 to use for \rtfN or \pwdN
  {$EXTERNALSYM SF_RTFVAL}
  SF_RTFVAL             = $0700;

  // All paragraph measurements are in twips

  {$EXTERNALSYM MAX_TABLE_CELLS}
  MAX_TABLE_CELLS       = 63;

  // PARAFORMAT 2.0 masks and effects
  {$EXTERNALSYM PFM_TEXTWRAPPINGBREAK}
  PFM_TEXTWRAPPINGBREAK = $20000000;    // RE 3.0
  {$EXTERNALSYM PFM_TABLEROWDELIMITER}
  PFM_TABLEROWDELIMITER = $10000000;    // RE 4.0

  // The following three properties are read only
  {$EXTERNALSYM PFM_COLLAPSED}
  PFM_COLLAPSED         = $01000000;    // RE 3.0
  {$EXTERNALSYM PFM_OUTLINELEVEL}
  PFM_OUTLINELEVEL      = $02000000;    // RE 3.0
  {$EXTERNALSYM PFM_BOX}
  PFM_BOX               = $04000000;    // RE 3.0
  {$EXTERNALSYM PFM_RESERVED2}
  PFM_RESERVED2         = $08000000;    // RE 4.0

  //!?! VS: Added by me
  PFM_ALL3 = PFM_ALL2 or PFM_COLLAPSED or PFM_OUTLINELEVEL or PFM_BOX or
    PFM_TEXTWRAPPINGBREAK;
  PFM_ALL4 = PFM_ALL3 or PFM_TABLEROWDELIMITER;

  // New effects
  {$EXTERNALSYM PFE_TEXTWRAPPINGBREAK}
  PFE_TEXTWRAPPINGBREAK = PFM_TEXTWRAPPINGBREAK shr 16; // (*)

  // The following four effects are read only
  {$EXTERNALSYM PFE_COLLAPSED}
  PFE_COLLAPSED         = PFM_COLLAPSED shr 16; // (+)
  {$EXTERNALSYM PFE_BOX}
  PFE_BOX               = PFM_BOX shr 16;       // (+)
  {$EXTERNALSYM PFE_TABLE}
  PFE_TABLE             = PFM_TABLE shr 16;     // Inside table row. RE 3.0
  {$EXTERNALSYM PFE_TABLEROWDELIMITER}
  PFE_TABLEROWDELIMITER = PFM_TABLEROWDELIMITER shr 16; // Table row start. RE 4.0

  // PARAFORMAT2 wNumbering options
  {$EXTERNALSYM PFN_ARABIC}
  PFN_ARABIC            = 2;    // tomListNumberAsArabic:   0, 1, 2,    ...
  {$EXTERNALSYM PFN_LCLETTER}
  PFN_LCLETTER          = 3;    // tomListNumberAsLCLetter: a, b, c,    ...
  {$EXTERNALSYM PFN_UCLETTER}
  PFN_UCLETTER          = 4;    // tomListNumberAsUCLetter: A, B, C,    ...
  {$EXTERNALSYM PFN_LCROMAN}
  PFN_LCROMAN           = 5;    // tomListNumberAsLCRoman:  i, ii, iii, ...
  {$EXTERNALSYM PFN_UCROMAN}
  PFN_UCROMAN           = 6;    // tomListNumberAsUCRoman:  I, II, III, ...

  // PARAFORMAT2 wNumberingStyle options
  {$EXTERNALSYM PFNS_PAREN}
  PFNS_PAREN            = $000; // default, e.g.,                                 1)
  {$EXTERNALSYM PFNS_PARENS}
  PFNS_PARENS           = $100; // tomListParentheses/256, e.g., (1)
  {$EXTERNALSYM PFNS_PERIOD}
  PFNS_PERIOD           = $200; // tomListPeriod/256, e.g.,               1.
  {$EXTERNALSYM PFNS_PLAIN}
  PFNS_PLAIN            = $300; // tomListPlain/256, e.g.,                1
  {$EXTERNALSYM PFNS_NONUMBER}
  PFNS_NONUMBER         = $400; // Used for continuation w/o number
  {$EXTERNALSYM PFNS_NEWNUMBER}
  PFNS_NEWNUMBER        = $8000;// Start new number with wNumberingStart
                                // (can be combined with other PFNS_xxx)

  // PARAFORMAT2 alignment options
  {$EXTERNALSYM PFA_JUSTIFY}
  PFA_JUSTIFY           = 4;    // New paragraph-alignment option 2.0 (*)
  {$EXTERNALSYM PFA_FULL_INTERWORD}
  PFA_FULL_INTERWORD    = 4;    // These are supported in 3.0 with advanced
  {$EXTERNALSYM PFA_FULL_INTERLETTER}
  PFA_FULL_INTERLETTER  = 5;    //  typography enabled
  {$EXTERNALSYM PFA_FULL_SCALED}
  PFA_FULL_SCALED       = 6;
  {$EXTERNALSYM PFA_FULL_GLYPHS}
  PFA_FULL_GLYPHS       = 7;
  {$EXTERNALSYM PFA_SNAP_GRID}
  PFA_SNAP_GRID         = 8;

type
  PENDropFiles = ^TENDropFiles;
  TENDropFiles = TEndDropFiles;

  PENOleOpFailed = ^TENOleOpFailed;

  PObjectPositions = ^TObjectPositions;

  PENLink = ^TENLink;

  PENLowFiRTF = ^TENLowFiRTF;
  {$EXTERNALSYM _enlowfirtf}
  _enlowfirtf = record
    nmhdr: TNMHdr;
    szControl: PChar;
  end;
  {$EXTERNALSYM ENLOWFIRTF}
  ENLOWFIRTF = _enlowfirtf;
  TENLowFiRTF = ENLOWFIRTF;

  PENCorrectText = ^TENCorrectText;

  PPunctuation = ^TPunctuation;

  PCompColor = ^TCompColor;

type
  // UndoName info
  {$EXTERNALSYM UNDONAMEID2}
  UNDONAMEID2 = (UID_UNKNOWN, UID_TYPING, UID_DELETE, UID_DRAGDROP, UID_CUT,
    UID_PASTE, UID_AUTOCORRECT);

const
  // Flags for the SETEXTEX data structure
  {$EXTERNALSYM ST_DEFAULT}
  ST_DEFAULT            = 0;
  {$EXTERNALSYM ST_KEEPUNDO}
  ST_KEEPUNDO           = 1;
  {$EXTERNALSYM ST_SELECTION}
  ST_SELECTION          = 2;
  {$EXTERNALSYM ST_NEWCHARS}
  ST_NEWCHARS           = 4;

type
  // EM_SETTEXTEX info; this struct is passed in the wparam of the message
  PSetTextEx = ^TSetTextEx;
  {$EXTERNALSYM _settextex}
  _settextex = record
    flags: DWORD;       // Flags (see the ST_XXX defines)
    codepage: UINT;     // Code page for translation (CP_ACP for sys default,
                        //  1200 for Unicode, -1 for control default)
  end;
  {$EXTERNALSYM SETTEXTEX}
  SETTEXTEX = _settextex;
  TSetTextEx = _settextex;

const
  // Flags for the GETEXTEX data structure
  {$EXTERNALSYM GT_SELECTION}
  GT_SELECTION          = 2;
  {$EXTERNALSYM GT_RAWTEXT}
  GT_RAWTEXT            = 4;
  {$EXTERNALSYM GT_NOHIDDENTEXT}
  GT_NOHIDDENTEXT       = 8;

type
  // BiDi specific features
  PBiDiOptions = ^TBiDiOptions;
  {$EXTERNALSYM _bidioptions}
  _bidioptions = record
    cbSize: UINT;
    wMask: Word;
    wEffects: Word;
  end;
  {$EXTERNALSYM BIDIOPTIONS}
  BIDIOPTIONS = _bidioptions;
  TBiDiOptions = BIDIOPTIONS;

const
  // BIDIOPTIONS masks
  {$EXTERNALSYM BOM_DEFPARADIR}
  BOM_DEFPARADIR        = $0001; // [1.0] Default paragraph direction (implies alignment) (obsolete)
  {$EXTERNALSYM BOM_PLAINTEXT}
  BOM_PLAINTEXT         = $0002; // [1.0] Use plain text layout (obsolete)
  {$EXTERNALSYM BOM_NEUTRALOVERRIDE}
  BOM_NEUTRALOVERRIDE   = $0004; // Override neutral layout (obsolete)
  {$EXTERNALSYM BOM_CONTEXTREADING}
  BOM_CONTEXTREADING    = $0008; // Context reading order
  {$EXTERNALSYM BOM_CONTEXTALIGNMENT}
  BOM_CONTEXTALIGNMENT  = $0010; // Context alignment

  // BIDIOPTIONS effects
  {$EXTERNALSYM BOE_RTLDIR}
  BOE_RTLDIR            = $0001; // [1.0] Default paragraph direction (implies alignment) (obsolete)
  {$EXTERNALSYM BOE_PLAINTEXT}
  BOE_PLAINTEXT         = $0002; // [1.0] Use plain text layout (obsolete)
  {$EXTERNALSYM BOE_NEUTRALOVERRIDE}
  BOE_NEUTRALOVERRIDE   = $0004; // Override neutral layout (obsolete)
  {$EXTERNALSYM BOE_CONTEXTREADING}
  BOE_CONTEXTREADING    = $0008; // Context reading order
  {$EXTERNALSYM BOE_CONTEXTALIGNMENT}
  BOE_CONTEXTALIGNMENT  = $0010; // Context alignment

const
  //+++++ ADDED FROM COMMDLG.H +++++
  {$EXTERNALSYM FR_DOWN}
  FR_DOWN               = $00000001;
  {$EXTERNALSYM FR_WHOLEWORD}
  FR_WHOLEWORD          = $00000002;
  {$EXTERNALSYM FR_MATCHCASE}
  FR_MATCHCASE          = $00000004;
  
  // Additional EM_FINDTEXT[EX] flags
  {$EXTERNALSYM FR_MATCHDIAC}
  FR_MATCHDIAC          = $20000000;
  {$EXTERNALSYM FR_MATCHKASHIDA}
  FR_MATCHKASHIDA       = $40000000;
  {$EXTERNALSYM FR_MATCHALEFHAMZA}
  FR_MATCHALEFHAMZA     = $80000000;

const
  // UNICODE embedding character
  {$EXTERNALSYM WCH_EMBEDDING}
  WCH_EMBEDDING         = WideChar($FFFC);

type
  // khyph - Kind of hyphenation
  TKHyph = (
    khyphNil,           // No Hyphenation
    khyphNormal,        // Normal Hyphenation
    khyphAddBefore,     // Add letter before hyphen
    khyphChangeBefore,  // Change letter before hyphen
    khyphDeleteBefore,  // Delete letter before hyphen
    khyphChangeAfter,   // Change letter after hyphen
    khyphDelAndChange   // Delete letter before hyphen and change
                        //  letter preceding hyphen
  );

  PHyphResult = ^THyphResult;
  {$EXTERNALSYM HYPHRESULT}
  HYPHRESULT = record
    khyph: TKHyph;      // Kind of hyphenation
    ichHyph: LongInt;   // Character which was hyphenated
    chHyph: WideChar;   // Depending on hyphenation type, character added, changed, etc.
  end;
  THyphResult = HYPHRESULT;

  {$EXTERNALSYM HyphenateProc}
  HyphenateProc = procedure(pszWord: PWideChar; langid: LANGID; ichExceed: LongInt;
    var phyphresult: THyphResult); stdcall;
  THyphenateProc = HyphenateProc;

  PHyphenateInfo = ^THyphenateInfo;
  {$EXTERNALSYM tagHyphenateInfo}
  tagHyphenateInfo = record
    cbSize: SmallInt;           // Size of HYPHENATEINFO structure
    dxHyphenateZone: SmallInt;  // If a space character is closer to the margin
                                //  than this value, don't hyphenate (in TWIPs)
    pfnHyphenate: THyphenateProc;
  end;
  {$EXTERNALSYM HYPHENATEINFO}
  HYPHENATEINFO = tagHyphenateInfo;
  THyphenateInfo = tagHyphenateInfo;

implementation

end.
Flocke's Garage
Valid HTML 4.01 Transitional Valid CSS!
(C) 2005-2013 Volker Siebert.
Creative Commons-LizenzvertragDer gesamte Inhalt dieser Webseite steht unter einer Creative Commons-Lizenz (sofern nicht anders angegeben).