C / C++ Headerfile

[Top]  [Chapter]  [Previous]  [Next]

 

// TDCreateDlg.h

// -----------------------------------------------------------------------------

// Create TextDynamic Interface

// Date: 5.10.2009

// -----------------------------------------------------------------------------

 

 

// For callbacks

typedef void (__stdcall fkt_wptextDialogCB)

     (unsigned long handle,

     long code, // mesage id

     long iparam, //

     unsigned long lparam,

     char *sparam,

     void *memo // IWPMemo // can be null. Current editor

     );

 

typedef void (__stdcall fkt_wptextDialogShow)

     (unsigned long handle,

     long code, // mesage id

     void *memo, // IWPMemo // can be null. Current editor

    void *memo2

     );

 

 

   // AnsiChar version

typedef struct

  {

   int size; 

   // window

   int modes;

   // 1=show statusbar

   // 2=modal dialog

   int toppanel_height;

   // 1=show status

   int border; 

   // EditorStart  (or use wptextSetLicense)

   char *licensename; //

   char *licensekey; // : PAnsiChar;

   

   // SetLayout(pccfile, pcclayout, pccpasswd,  "main", "main")

   //  pcclayout defaults to "default"

   //  pccpasswd defaults to ""

   char *pccfile; //, 

   char *pcclayout; //, 

   char *pccpasswd; // : PAnsiChar;

 

   // SetEditorMode

   int editor_mode; //, 

   int editor_xmode; //, 

   int editor_gui1; //, 

   int editor_gui2; //

 

   // Layoutmode and Zoom  (-1 = default, unchanged)

   int editor1_layoutmode; //

   int editor1_autozoom; //

   int editor1_zoom; //

   int editor2_layoutmode; //

   int editor2_autozoom; //

   int editor2_zoom; // // Ignored for thumbnailmode

 

   // Toolbar Colors

   unsigned long toolbar_mode;

   unsigned long toolbar_colfrom;

   unsigned long toolbar_colto;

 

   // Background Colors

   unsigned long desktop_mode;

   unsigned long desktop_colfrom;

   unsigned long desktop_colto;

 

   // SetBProp - Index=Group, Bit Nr=Id, ADD to set, DEL to clear

   unsigned long Memo1_SetBProp_ADD[20];

   unsigned long Memo1_SetBProp_DEL[20];

   unsigned long Memo2_SetBProp_ADD[20];

   unsigned long Memo2_SetBProp_DEL[20];

 

   // Load a file

   char *loadfile;

   int  loadfilemode; 

 

   // Callbacks

   unsigned long msgwindow;

   fkt_wptextDialogCB OnQueryClose;  // result=0 -> may not close

   fkt_wptextDialogShow AfterShow; // After show dialog - now can modify

 

   // Spellcheck

   char *spell_inifile;

   int spell_langid; // selected language

   int spell_modes; // Activate SpellAsYouGo ...

} TDCreateDialogParam;

 

typedef HWND (__stdcall fkt_wptextCreateDialog)

    ( HWND parent,

     TDCreateDialogParam *params,

     int x,

    int y,

    int w,

    int h,

    unsigned long *ed

     );

 

 

// Constants

#define  WMP_DLLBASE 1029 // WM_USER ...

#define  WPDLL_SYS   10  // System commands

#define  WPDLL_DATA  100 // Create new data

#define  WPDLL_GUI  1000 // GUI commands, enable, disable etc

#define  WPDLL_COM  9000 // ..9999 Commands sent to the editor, change attributes etc

 

#define    WMP_EXCOMMAND WMP_DLLBASE + 1  // lparam=ptr to TCOMEditDataCommand record, wparam=SizeOf(TCOMEditDataCommand)

#define    WMP_SETIPROP WMP_DLLBASE + 2  // Set Integer Property: wparam=id, lparam value

  // ids - modify Editor #1 (also see Memo.TextCommand)

#define     WIPR_ED1_PAGE_WIDTH 1 

#define     WIPR_ED1_PAGE_HEIGHT 2 

#define     WIPR_ED1_PAGE_LEFT_MARGIN 3 

#define     WIPR_ED1_PAGE_RIGHT_MARGIN 4 

#define    WIPR_ED1_PAGE_TOP_MARGIN 5 

#define     WIPR_ED1_PAGE_BOTTOM_MARGIN 6 

#define     WIPR_ED1_PAGE_HEADER_MARGIN 7 

#define     WIPR_ED1_PAGE_FOOTER_MARGIN 8 

#define     WIPR_ED1_PAGE_DRAW_MODE 9  // Background image, address ...

#define     WIPR_ED1_PAGE_LINE_MODE 10  // 0=adress top-left, 1=addres top right, 2=lineoffset

#define     WIPR_ED1_PAGE_LINEOFFSET_LEFT 11 

#define     WIPR_ED1_PAGE_LINEOFFSET_RIGHT 12 

#define     WIPR_ED1_PAGE_LINEOFFSET_TOP 13 

#define     WIPR_ED1_PAGE_LINEOFFSET_BOTTOM 14 

#define     WIPR_ED1_PAGES_MINCOUNT 15 

#define     WIPR_ED1_PAGES_MAXCOUNT 16 

#define     WIPR_ED1_PAGES_COUNT 17 

#define     WIPR_ED1_PAGES_MULTIPLICATOR 18

 

     // for Editor#2

#define     WIPR_ED2_PAGE_WIDTH 101 

#define     WIPR_ED2_PAGE_HEIGHT 102 

#define     WIPR_ED2_PAGE_LEFT_MARGIN 103 

#define     WIPR_ED2_PAGE_RIGHT_MARGIN 104 

#define     WIPR_ED2_PAGE_TOP_MARGIN 105 

#define     WIPR_ED2_PAGE_BOTTOM_MARGIN 106 

#define     WIPR_ED2_PAGE_HEADER_MARGIN 107 

#define     WIPR_ED2_PAGE_FOOTER_MARGIN 108 

#define     WIPR_ED2_PAGE_DRAW_MODE 109  // Background image, address ...

#define     WIPR_ED2_PAGE_LINE_MODE 110  // 0=adress top-left, 1=addres top right, 2=lineoffset

#define     WIPR_ED2_PAGE_LINEOFFSET_LEFT 111 

#define     WIPR_ED2_PAGE_LINEOFFSET_RIGHT 112 

#define     WIPR_ED2_PAGE_LINEOFFSET_TOP 113 

#define     WIPR_ED2_PAGE_LINEOFFSET_BOTTOM 114 

#define     WIPR_ED2_PAGES_MINCOUNT 115 

#define     WIPR_ED2_PAGES_MAXCOUNT 116 

#define     WIPR_ED2_PAGES_COUNT 117 

#define     WIPR_ED2_PAGES_MULTIPLICATOR 118

 

#define  WMP_EDCOMMAND WMP_DLLBASE + 11  // wparam=commandid, lparam=parameter for EDITOR A

#define  WMP_EDbCOMMAND WMP_DLLBASE + 12  // wparam=commandid, lparam=parameter for EDITOR B

#define  WMP_EDCOMMANDSTR WMP_DLLBASE + 13  // wparam=commandid, lparam=char* for EDITOR A

#define  WMP_EDbCOMMANDSTR WMP_DLLBASE + 14  // wparam=commandid, lparam=char* for EDITOR A

#define  WMP_EDUCOMMANDSTR WMP_DLLBASE + 15  // wparam=commandid, lparam=widechar* for EDITOR A

#define  WMP_EDUbCOMMANDSTR WMP_DLLBASE + 16  // wparam=commandid, lparam=widechar* for EDITOR B

#define  WMP_WPA_PROCESS       WMP_DLLBASE + 22  // wparam= char *wpaAction, lparam=parama  - for current editor

#define  WMP_WPA_PROCESS_1     WMP_DLLBASE + 23  // wparam= char *wpaAction, lparam=parama  - for editor #1

#define  WMP_WPA_PROCESS_2     WMP_DLLBASE + 24  // wparam= char *wpaAction, lparam=parama  - for editor #2

 

#define   WPSYS_ABOUTBOX        WPDLL_SYS + 16 // show about box

#define   WPSYS_CLEAR           WPDLL_SYS + 17 // clears both editors

#define   WPSYS_SETLANGUAGE     WPDLL_SYS + 18 // set language

#define   WPSYS_SETSPLITTERPOS  WPDLL_SYS + 19 // set splitter pos in %

#define   WPSYS_GETSHOWHINT     WPDLL_SYS + 20 // ShowHint

#define   WPSYS_SETSHOWHINT    WPDLL_SYS + 21 //

 

#define WPDLL_COM_REFORMAT WPDLL_COM + 0  // Reformat in next idle phase, Param=1 at once, 2=at once + init,

#define  WPDLL_COM_ASET WPDLL_COM + 1  // ASet()

#define  WPDLL_COM_AGET WPDLL_COM + 2  // AGet()

#define  WPDLL_COM_ASETDEFTABFILL  WPDLL_COM + 3  // ASet()

#define  WPDLL_COM_ASETDEFTABCOLOR WPDLL_COM + 4  // uses color UParam

#define  WPDLL_COM_STYLE_CREATE    WPDLL_COM + 5  // create a style and select it. If existing than clear it!

#define  WPDLL_COM_STYLE_SELECT    WPDLL_COM + 6  // selects/creates a style (to edit it)

#define  WPDLL_COM_STYLE_DELETE    WPDLL_COM + 7  // deletes a style

#define  WPDLL_COM_STYLE_GETLIST   WPDLL_COM + 8  // read comma separated list.

  // Use WPDLL_DATA_GETSTRING to read it!

#define  WPDLL_COM_STYLE_GETWPCSS  WPDLL_COM + 9   // Read WPCSS - one style

#define  WPDLL_COM_STYLE_SETWPCSS  WPDLL_COM + 10  // Set WPCSS  - one style

#define  WPDLL_COM_STYLE_GETALLASSTR WPDLL_COM + 11  // Read all as string (Param=Format: 0=WPCSS  1=CSS, 2=INI)

#define  WPDLL_COM_STYLE_SETALLASSTR WPDLL_COM + 12  // Set all as string (Param=Format: 0=WPCSS  1=CSS, 2=INI)

#define  WPDLL_COM_STYLE_SAVEFILE    WPDLL_COM + 13  // Save all to file

#define  WPDLL_COM_STYLE_LOADFILE    WPDLL_COM + 14  // Load all from file

  // MAIN EDIT COMMANDS - some are superseded ----------------------------------

#define  WPDLL_COM_TEXT_CLEAR        WPDLL_COM + 15  // Clear the text, Param=1 "ClearEx", + bit 2,3,4

#define  WPDLL_COM_TEXT_CLEARBODY    WPDLL_COM + 16  // Clear only body, keep header+footer

#define  WPDLL_COM_TEXT_BACKUP       WPDLL_COM + 17  // backup template, Bit1 to ignore page size

#define  WPDLL_COM_TEXT_RESTORE      WPDLL_COM + 18  // restore template

#define  WPDLL_COM_TEXT_HIDESEL      WPDLL_COM + 19  // hide selection

#define  WPDLL_COM_TEXT_SELECTALL    WPDLL_COM + 20  // select all

#define  WPDLL_COM_TEXT_BEGINENDPRINT WPDLL_COM + 21  // BeginPrint/EndPrint (Param=Begin)

#define  WPDLL_COM_TEXT_PRINT        WPDLL_COM + 22  // print, optionla Param, Param2 to select range [1..n]

#define  WPDLL_COM_TEXT_SELECTPRINTER WPDLL_COM + 23  // select printer 'name'

#define  WPDLL_COM_TEXT_PRINTDIA     WPDLL_COM + 24  // print dialog

// Sow a DIALOG_....

#define  WPDLL_COM_TEXT_DIALOG       WPDLL_COM + 25  // show modal dialog (preview etc)

 

// Load and save commands

#define  WPDLL_COM_TEXT_LOADFILE     WPDLL_COM + 26  // buffer1=filename, buffer2=format, param=1 for 'Insert'#define  WPDLL_COM_TEXT_SAVEFILE     WPDLL_COM + 27  // buffer1=filename, buffer2=format, param=1 for SelectionOnly

#define  WPDLL_COM_TEXT_LOADSTR      WPDLL_COM + 28  // buffer1=str, buffer2=format, param=1 for 'Insert'

#define  WPDLL_COM_TEXT_SAVESTR      WPDLL_COM + 29  // out: datastring, buffer2=format, param=1 for SelectionOnly

#define  WPDLL_COM_POS_SET          WPDLL_COM + 30  // param=what, param2=value, buffer=opt value, (bookmark), param3=1 for relative pos

#define    POSGOTO_POSITION   0  // Absolute character Position

#define    POSGOTO_PAR        1  // Absolute Paragraph Nr

#define    POSGOTO_POSINPAR   2  // Position in current paragraph

#define    POSGOTO_PAGE       3  // Absolute Page Nr

#define    POSGOTO_FIELD      4  // Field (buffer)

#define    POSGOTO_Bookmark   5  // Bookmark (buffer)

#define  WPDLL_COM_POS_GET           WPDLL_COM + 31  // get position

  // --- POS_PARAM_ ....

#define  WPDLL_COM_POS_SELECT        WPDLL_COM + 32  // param=what, param2=value, buffer=opt value (bookmark)

  // subset of POS_PARAM_

#define  WPDLL_COM_MOVE              WPDLL_COM + 33  // param=what move (select end), Param2=1 to select

#define  WPDLL_COM_DROP_MARKER       WPDLL_COM + 34  // drop marker

#define  WPDLL_COM_COLLECT_MARKER    WPDLL_COM + 35  // collect marker (goto last pos)

  // --- DATA_PARAM_ ....

#define  WPDLL_COM_ACTIVATE          WPDLL_COM + 36  // Makes sure the editor is active

#define  WPDLL_COM_TEXT_LOADSTREAM   WPDLL_COM + 37  // buffer1=ISTREAM, buffer2=format, param=1 for Insert

#define  WPDLL_COM_TEXT_SAVESTREAM   WPDLL_COM + 38  // buffer1=ISTREAM, buffer2=format, param=1 for SelectionOnly

 

 

#define  WPDLL_COM_ProcessWPA        WPDLL_COM + 56  // buffer1 wpaname, buffer2=param, if buffer1=null then param=id

#define  WPDLL_COM_CheckWPA          WPDLL_COM + 57  // buffer1 wpaname, result: bit1=enabled, bit 2=checked, bit3=hidden

#define  WPDLL_COM_FindHeader        WPDLL_COM + 58  // param=range, buffer=1 name, Result ID

#define  WPDLL_COM_FindFooter        WPDLL_COM + 59  // param=range, buffer=1 name, Result ID

#define  WPDLL_COM_GetRTFVariable    WPDLL_COM + 60  // Buffer=name, Result=String

#define  WPDLL_COM_SetRTFVariable    WPDLL_COM + 61  // Buffer=name, buffer2=texts

 

#define  WPDLL_COM_TextCursor        WPDLL_COM + 62  // Result :=  IWPTextCursor

#define  WPDLL_COM_PDFCreator        WPDLL_COM + 63  // Result :=  IWPPdfCreator

#define  WPDLL_COM_TextAttr          WPDLL_COM + 64  // Result :=  CurrSelAttr or CurrAttr

#define  WPDLL_COM_GetIDWPA          WPDLL_COM + 65  // Result :=  if for wpa action

#define  WPDLL_COM_GetExceptionList  WPDLL_COM + 66  // Result :=  list of recent exceptions

#define  WPDLL_COM_GetMAPI           WPDLL_COM + 67  // Result :=  IWPMapi Interface

#define  WPDLL_COM_GetSPELL          WPDLL_COM + 68  // Result :=  IWPSpell Interface

  // Input Commands (if possible better use IWPTextCursor!)

#define  WPDLL_COM_InputText         WPDLL_COM + 70  // Param=width in %, negativ=absolute twips. Buffer=Text

#define  WPDLL_COM_InputParagraph    WPDLL_COM + 71  // Param=Mode, Buffer=StyleName

#define  WPDLL_COM_InputSection      WPDLL_COM + 72  // reserved , param=mode

#define  WPDLL_COM_InputTable        WPDLL_COM + 73  // buffer=name

#define  WPDLL_COM_InputTableRowStart WPDLL_COM + 74  // param=Mode

#define  WPDLL_COM_InputTableCell    WPDLL_COM + 75  // buffer=StyleName, buffer2=Text

#define  WPDLL_COM_InputTableRowEnd  WPDLL_COM + 76  // Don't forget!

#define  WPDLL_COM_InputField        WPDLL_COM + 77  // buffer=name, buffer2=text

#define  WPDLL_COM_InputHyperLink    WPDLL_COM + 78  // buffer=URL, buffer2=text  (wrap text if selected!)

#define  WPDLL_COM_InputBookmark     WPDLL_COM + 79  // buffer=name, buffer2=text (wrap text if selected!)

#define  WPDLL_COM_InputImage        WPDLL_COM + 80  // param=1=link, buffer=FileName

#define  WPDLL_COM_InputClearTabstop WPDLL_COM + 81  // clears all tabs

#define  WPDLL_COM_InputTabstop      WPDLL_COM + 82  // param=Value, param2=kind, param3=FillMode, uparam=color, also inserts #9!

#define  WPDLL_COM_InputObject       WPDLL_COM + 83  // param=Typ, param2=mode, buffer=name, buffer2=Command (mode=1: create pair and place cusror inbetween

#define  WPDLL_COM_InputHeader       WPDLL_COM + 84  // param=Range, buffer=text (rtf, html)

#define  WPDLL_COM_InputFooter       WPDLL_COM + 85  // param=Range, buffer=text (rtf, html)

#define  WPDLL_COM_InputFootnote     WPDLL_COM + 86  // param=mode, buffer=text

#define  WPDLL_COM_InputTextbox      WPDLL_COM + 87  // param=width, buffer=text (rtf, html)

#define  WPDLL_COM_InputPicture      WPDLL_COM + 88  // param=w, param2=h + UParam IPicture interface

#define  WPDLL_COM_InputPictureStream WPDLL_COM + 89  // param=w, param2=h + UParam IStream interface, buffer=Extension (BMP, WMF ...)

 

// The following ignore an empty string. They always set the current result string to the current value. 

// Use WPDLL_DATA_GETSTRING to retrive the current string

#define  WPDLL_COM_INITIALDIR         WPDLL_COM + 90 // Set the initial directory for file open.

#define  WPDLL_COM_INITIALGRAPHICDIR  WPDLL_COM + 91 // Set the initial image directory for image insert

#define  WPDLL_COM_LASTFILENAME  WPDLL_COM + 92 // Set / retrieve the current file name

 

#define  WPDLL_COM_DrawToHDC WPDLL_COM + 108  // UParam=HDC, GUIElement=X, Param3=Y, Param=Width, Param2=Height

#define  WPDLL_COM_DrawToBitmap WPDLL_COM + 109  // UParam=HBitmap, GUIElement=X, Param3=Y, Param=Width, Param2=Height

#define  WPDLL_COM_SavePageAsMetafile     WPDLL_COM + 110  // param=pagenr, param2=options, buffer=filename

 

#define  WPDLL_COM_CreateReport   WPDLL_COM + 111 

#define  WPDLL_COM_GETINTERFACE   WPDLL_COM + 112 

#define  WPDLL_COM_GETXY   WPDLL_COM + 113 

 

#define  WPDLL_COM_PrintToDC     WPDLL_COM + 114  // for IViewObjectExImpl::Draw

#define  WPDLL_COM_PrintToDCGetH WPDLL_COM + 115  // get height - in twips

#define  WPDLL_COM_EvGetButton   WPDLL_COM + 116  // Helper for VisualFoxPRO

#define  WPDLL_COM_EvGetContents WPDLL_COM + 117 

#define  WPDLL_COM_EvGetBand     WPDLL_COM + 118 

 

#define  WPDLL_COM_PROTECTEDTEXT WPDLL_COM + 119  // Set SecurityOptions and protect them

#define WPDLL_COM_ConvertTokens WPDLL_COM + 120  // Convert Tokens to ReportTemplate

 

#define  WPDLL_COM_PrintPDF      WPDLL_COM + 121    // same as PDFCreator Print 1. Optionally a filename can be passed as parameter.

#define  WPDLL_COM_PrintPDF2      WPDLL_COM + 122  // same as PDFCreator PrintSecond

 

// Some commands write an ansi string. This command is used to retrieve the result string

// Call it with a null buffer to get the size, call it again with a correctly dimensioned buffer to retrieve data

#define WPDLL_DATA_GETSTRING  WPDLL_DATA+ 16 // Get Length of data buffer, fill buffer

#define WPDLL_DATA_GETSTRINGW WPDLL_DATA+ 17  // Get Length of data buffer, fill WIDECHAR buffer

 

// IDs for WPDLL_COM_TEXT_DIALOG

#define DIALOG_Print  1            //    wpaPrintDialog

#define DIALOG_PrinterSetup  2     //    wpaPrinterSetup

#define DIALOG_Find  3             //    wpaSearch

#define DIALOG_Replace  4          //    wpaReplace

#define DIALOG_OPEN  5             //    wpaOpen

#define DIALOG_SAVE  6             //    wpaSave

#define DIALOG_SAVEAS  7           //    wpaSaveAs

#define DIALOG_Preview  8  

#define DIALOG_PageProp  9  

#define DIALOG_PagePropPaperNames  10   // like PageProp but show paper names, too

#define DIALOG_SectionProp  11    // reserved

#define DIALOG_ParagraphProp  12  

#define DIALOG_Tabstops  13  

#define DIALOG_Bullet  14  

#define DIALOG_BulletOutlines  15    // Bullets and Numbers and Outlines

#define DIALOG_ParagraphBorder  16  

#define DIALOG_StyleSheet  17  

#define DIALOG_OneStyle  18  

#define DIALOG_Spellcheck  19  

#define DIALOG_SpellOptions  20  

#define DIALOG_ExportToWord  21  

#define DIALOG_ExportToPDF  22  

#define DIALOG_INSSymbol  23  

#define DIALOG_INSTable  24  

#define DIALOG_INSGRAPHIC  25  

#define DIALOG_INSGRAPHICLINK  26  

#define DIALOG_INSTextBox  27  

#define DIALOG_INSHyperlink  28  

#define DIALOG_INSBookmark  29  

#define DIALOG_INSFields  30  

#define DIALOG_ReportBands  31  

#define DIALOG_PDFProperties  32  

#define DIALOG_PrintLabels  33  

#define DIALOG_PrintBooklet  34  

#define DIALOG_DocInfo  35   // info + stats

#define DIALOG_Templates  36   // quick replacement

#define DIALOG_DocVariable  37   // caption  caption param  name  (RTFVariable!)

#define DIALOG_WPAbout  38   // TextDynamic about form

#define DIALOG_WPDebug  39   // Debug form with current paragraph attributes

#define DIALOG_MessageBox  40   // caption  caption param  text

#define DIALOG_PagePropPaperTray  41  

#define DIALOG_ManageFormulas  42  

#define DIALOG_ManageHeaderFooter  43  

#define DIALOG_FontSelect    44   // Standard Font Dialog


[c___c_headerfile.htm]    Copyright © 2007 by WPCubed GmbH