home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Unleashed / Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso / tedevkit / ter_def.h < prev    next >
Text File  |  1995-09-05  |  34KB  |  857 lines

  1. /******************************************************************************
  2.                 Constant Definitions
  3. *******************************************************************************/
  4.  
  5. #define MAX_TYPES          50    
  6. #define MAX_POINTS         16    
  7. #define MAX_FONTS          170    
  8. #define MAX_SEGS           200
  9. #define INITIAL_MAX_LINES  200
  10. #define MAX_RTF_FONTS      200
  11. #define MAX_RTF_COLORS     200
  12. #define MAX_RTF_GROUPS     50
  13. #define MAX_TABS           300
  14. #define MAX_TAB_STOPS      20
  15. #define MAX_SPACES         20
  16. #define MAX_SECTS          100
  17. #define MAX_FRAMES         1500
  18. #define MAX_PARA_FRAMES    200
  19. #define MAX_FIELDS         100
  20. #define MAX_WIN_PTRS       200 
  21. #define MAX_TASKS          50 
  22. #define MAX_DRAG_OBJS      500
  23. #define MAX_CELLS          800
  24. #define MAX_TABLE_ROWS     400
  25. #define MAX_SPEED_KEYS     200
  26. #define MAX_PAGES          2500
  27. #define MAX_PREVIEW_PAGES  2
  28. #define MAX_ZOOMS          8
  29.  
  30. #define NUM_WIDTH_CHARS    256
  31. #define BORDER_MARGIN      75
  32.  
  33. #define ID_FIRST_COMMAND   600
  34.  
  35. #define MIN_CELL_WIDTH     360    // min cell width in twips
  36. #define WORD_ROW_INDENT    108    // standard indentation in MS WORD
  37.  
  38. #define SIGN_EOF16         0xBC
  39. #define SIGN_EOF32         0xBA
  40.  
  41. #define DIB_TO_METAFILE  
  42.                                                                                                                                     
  43. #define PICT_DIBITMAP      0x0
  44. #define PICT_METAFILE      0x1
  45.  
  46. #define OBJ_NONE           0x0
  47. #define OBJ_EMBED          0x1
  48. #define OBJ_LINK           0x2
  49. #define OBJ_EMBED_TEMP     0x3
  50. #define OBJ_EMBED_INSERT   0x4
  51.                                                                                                                                     
  52. #define DEFAULT_CFMT       0x0   
  53.                                  
  54. #define BOLD_WEIGHT        700   
  55. #define NORM_WEIGHT        400   
  56.                                  
  57. #define UNIFORM            0xFFFF
  58.                                  
  59.                                  
  60. #define MAX_PFMT           2000    
  61. #define EACH_INDENT        360
  62. #define MAX_INDENT         5760
  63. #define MAX_PARA_PER_WIN   30
  64. #define MAX_PARA_PER_PAGE  100
  65.  
  66. #define REDUCTION          2
  67. #define CELL_MARGIN        180      // cell margin in twips
  68. #define FRAME_MARGIN       75       // frame margin
  69. #define FRAME_BORDER_WIDTH 15       // frame border width
  70.                               
  71. #define PAINT_MIN          1
  72. #define PAINT_LINE         2
  73. #define PAINT_WIN          3
  74. #define PAINT_PARTIAL_WIN  5
  75. #define PAINT_RANGE        6
  76. #define PAINT_WIN_RESET    7
  77.  
  78. #define PAINT_DIRECT       1   
  79. #define PAINT_MEM          2   
  80.                                
  81. #define HOR_SCROLL_MIN     0   
  82. #define HOR_SCROLL_MAX     100 
  83. #define VER_SCROLL_MIN     0   
  84. #define VER_SCROLL_MAX     100 
  85.                                
  86. #define STATUS_ROW         -1 
  87. #define MAX_LINES_PER_WIN  2000
  88.  
  89. #define RTF_BUF_LEN        4096
  90. #define RTF_LINE_LEN       80
  91.  
  92. #define RTF_BEGIN          1
  93. #define RTF_END            2
  94. #define RTF_CONTROL        3
  95. #define RTF_TEXT           4
  96. #define RTF_PROPERTY       5
  97. #define RTF_PICT           6
  98. #define RTF_SECT           7
  99. #define RTF_OBJECT         8
  100.  
  101. #define RTF_FILE_INCOMPLETE 1
  102. #define RTF_SYNTAX_ERROR    2
  103.  
  104. #define RTF_FILE           0
  105. #define RTF_BUF            1
  106. #define RTF_CB             2
  107. #define RTF_CB_BUF         3
  108.  
  109. #define PARAM_NONE          0
  110. #define PARAM_INT           1
  111. #define PARAM_DBL           2
  112.  
  113. #define TAB                 9
  114. #define RULER_TOLERANCE     50
  115. #define DEF_TAB_WIDTH       720      // default tab width in twips
  116.  
  117. #define PAGE_CHAR           12       // new page character
  118. #define SECT_CHAR           20       // new section character
  119. #define COL_CHAR            22       // new column character
  120. #define ROW_CHAR            18       // new table row character
  121. #define HDR_CHAR            17       // page header begin/end char
  122. #define FTR_CHAR            16       // page footer begin/end char
  123.  
  124. #define MIN_LINES_PER_PAGE  20
  125.  
  126. #define BORDER_TOP          0x1
  127. #define BORDER_BOT          0x2
  128. #define BORDER_LEFT         0x4
  129. #define BORDER_RIGHT        0x8
  130. #define BORDER_ALL          0xF
  131.  
  132. #define BORDER_INDEX_TOP    0
  133. #define BORDER_INDEX_BOT    1
  134. #define BORDER_INDEX_LEFT   2
  135. #define BORDER_INDEX_RIGHT  3
  136.  
  137. #define BORDER_PARA_TOP     0
  138. #define BORDER_PARA_BOT     1
  139. #define BORDER_PARA_LEFT    2
  140. #define BORDER_PARA_RIGHT   3
  141. #define BORDER_CELL_TOP     4
  142. #define BORDER_CELL_BOT     5
  143. #define BORDER_CELL_LEFT    6
  144. #define BORDER_CELL_RIGHT   7
  145. #define BORDER_ROW_TOP      8
  146. #define BORDER_ROW_BOT      9
  147. #define BORDER_ROW_LEFT    10
  148. #define BORDER_ROW_RIGHT   11
  149. #define MAX_BORDERS        12
  150.  
  151. #define BOX_TOP             0x10
  152. #define BOX_BOT             0x20
  153. #define BOX_LEFT            0x40
  154. #define BOX_RIGHT           0x80
  155. #define BOX_DOUBLE          0x100
  156. #define BOX_THICK           0x200
  157.  
  158. #define INFO_TAB            0x1
  159. #define INFO_SECT           0x2
  160. #define INFO_PAGE           0x4
  161. #define INFO_COL            0x8
  162. #define INFO_CELL           0x10
  163. #define INFO_ROW            0x20
  164. #define INFO_TABLE          0x40
  165. #define INFO_JUST           0x80
  166. #define INFO_HDR            0x100
  167. #define INFO_FTR            0x200
  168. #define INFO_HDR_FTR        0x300
  169. #define INFO_FRAME          0x400
  170. #define INFO_SPACE_LINE     0x800
  171. #define INFO_PAGE_NUMBER    0x1000
  172.  
  173. #define SECT_NEW_PAGE       0
  174. #define SECT_CONTINUE       1
  175.  
  176. #define HYPER_CODE          HIDDEN
  177.  
  178. #define FIELD_NAME          ULINED
  179.  
  180. #define PROTECT_COLOR       0x4F4F4F       // color applied to protected text
  181.  
  182. #define BM_UNCHECKED        0  
  183. #define BM_CHECKED          1  
  184. #define BM_NONE             2  
  185.  
  186. #define MAX_DATA_LEN        100
  187.  
  188. #define MAX_PASTE_FORMATS   6
  189. #define PASTE_OBJECT        0
  190. #define PASTE_RTF           1
  191. #define PASTE_TEXT          2
  192. #define PASTE_PICT          3
  193. #define PASTE_BM            4
  194. #define PASTE_DIB           5
  195.  
  196. #define PASTE_DESC_OBJECT   "Object"
  197. #define PASTE_DESC_RTF      "Formatted Text (RTF)"
  198. #define PASTE_DESC_TEXT     "Unformatted Text"
  199. #define PASTE_DESC_PICT     "Picture"
  200. #define PASTE_DESC_BM       "Bitmap"
  201. #define PASTE_DESC_DIB      "Device Independent Bitmap"
  202.  
  203. #define OLENOT_CHANGED      0x1
  204. #define OLENOT_SAVED        0x2
  205. #define OLENOT_CLOSED       0x4
  206.  
  207. #define MSDRAW_CLASS        "MSDraw"
  208.  
  209. #define FRAME_DIST_FROM_TEXT 180
  210. #define FRAME_DIST_FROM_MARGIN 1440        // minimum distance from the margin
  211.  
  212. #define TER_IDLE            (WM_USER+10)   // message posted to do idle activity
  213.  
  214. // drag object types
  215. #define DRAG_TYPE_SCR_FIRST    1
  216. #define DRAG_TYPE_PICT         1
  217. #define DRAG_TYPE_FRAME_SIZE   2
  218. #define DRAG_TYPE_FRAME_MOVE   3
  219. #define DRAG_TYPE_SCR_LAST     3
  220.  
  221. #define DRAG_TYPE_RULER_BEGIN  5
  222. #define DRAG_TYPE_RULER_LEFT   5
  223. #define DRAG_TYPE_RULER_RIGHT  6
  224. #define DRAG_TYPE_RULER_FIRST  7
  225. #define DRAG_TYPE_RULER_TAB    8
  226. #define DRAG_TYPE_RULER_END    8
  227.  
  228. #define DRAG_TYPE_CELL         9
  229. #define DRAG_TYPE_ROW_INDENT  10
  230.  
  231. #define DRAG_HOT_LEFT          0
  232. #define DRAG_HOT_RIGHT         1
  233. #define DRAG_HOT_TOP           2
  234. #define DRAG_HOT_BOT           3
  235.  
  236. #define DRAG_TAB_WIDTH      100
  237.  
  238. #define CFLAG_SEL1             1      // cell selection flag
  239. #define CFLAG_SEL2             2      // another cell selection flag
  240.  
  241. #define FRAME_RIGHTMOST      0x1      // rightmost frame
  242. #define FRAME_LAST           0x2      // last text frame
  243. #define FRAME_ON_SCREEN      0x4      // frame displayed on the screen
  244.  
  245. #define CURS_RESET           0        // used for cursor adjustment for hidden text
  246. #define CURS_FORWARD         1
  247. #define CURS_BACKWARD        2
  248. #define CURS_UP              3
  249. #define CURS_DOWN            4
  250.  
  251. #define PV_PAGE_DIST         1        // print preview page distance
  252.  
  253. #define PARA_FRAME_HPAGE     1        // align relative to the left edge of the page
  254. #define PARA_FRAME_USED      2
  255. #define PARA_FRAME_RIGHT_JUST 4
  256. #define PARA_FRAME_CENTER    8
  257.  
  258. #define PARA_FRAME_MIN_WIDTH 360     // minimum width of a para frame
  259.  
  260. #define WIN_BOT_MARGIN       (ScrResY/4)
  261.  
  262. #define FIELD_ID_PAGE        1        // field id for the page field
  263.  
  264. #define LFLAG_PARA           0x1      // paragraph or cell break line
  265. #define LFLAG_BREAK          0x2      // any other break line
  266. #define LFLAG_PARA_FIRST     0x4      // first para line
  267.  
  268. // Short type defintions
  269. #if defined (INC_OLE1)
  270.    typedef int   (CALLBACK *CLIENT_CALLBACK)(LPOLECLIENT,OLE_NOTIFICATION,LPOLEOBJECT);
  271.    typedef DWORD (CALLBACK *OLESTREAM_GET)(LPOLESTREAM,void FAR *,DWORD);
  272.    typedef DWORD (CALLBACK *OLESTREAM_PUT)(LPOLESTREAM,OLE_CONST void FAR *,DWORD);
  273. #else
  274.    #define OLECLIPFORMAT WORD
  275.    #if !defined(WIN32) 
  276.       typedef LPSTR LPOLESTR;
  277.    #endif
  278. #endif
  279.  
  280. // unit conversion macros
  281. #define    PointsToScrX(x)  (MulDiv(x,ScrResX,72))
  282. #define    ScrToPointsX(x)  (MulDiv(x,72,ScrResX))
  283.  
  284. #define    PointsToScrY(x)  (MulDiv(x,ScrResY,72))
  285. #define    ScrToPointsY(x)  (MulDiv(x,72,ScrResY))
  286.  
  287. #define    PointsToPrtX(x)  (MulDiv(x,PrtResX,72))
  288. #define    PrtToPointsX(x)  (MulDiv(x,72,PrtResX))
  289.  
  290. #define    PointsToPrtY(x)  (MulDiv(x,PrtResY,72))
  291. #define    PrtToPointsY(x)  (MulDiv(x,72,PrtResY))
  292.  
  293. #define    TwipsToScrX(x)  (MulDiv(x,ScrResX,1440))
  294. #define    ScrToTwipsX(x)  (MulDiv(x,1440,ScrResX))
  295.  
  296. #define    TwipsToScrY(x)  (MulDiv(x,ScrResY,1440))
  297. #define    ScrToTwipsY(x)  (MulDiv(x,1440,ScrResY))
  298.  
  299. #define    TwipsToPrtX(x)  (MulDiv(x,PrtResX,1440))
  300. #define    PrtToTwipsX(x)  (MulDiv(x,1440,PrtResX))
  301.  
  302. #define    TwipsToPrtY(x)  (MulDiv(x,PrtResY,1440))
  303. #define    PrtToTwipsY(x)  (MulDiv(x,1440,PrtResY))
  304.  
  305. #define    ScrToPrtX(x)    (MulDiv(x,PrtResX,ScrResX))
  306. #define    PrtToScrX(x)    (MulDiv(x,ScrResX,PrtResX))
  307.  
  308. #define    ScrToPrtY(x)    (MulDiv(x,PrtResY,ScrResY))
  309. #define    PrtToScrY(x)    (MulDiv(x,ScrResY,PrtResY))
  310.  
  311. #define    TwipsToInches(x)   (((float)(x))/1440)
  312. #define    InchesToTwips(x)   ((long)((x)*1440))
  313.  
  314. #define    PointsToInches(x)   (((float)(x))/72)
  315. #define    InchesToPoints(x)   ((long)((x)*72))
  316.  
  317. #define    TwipsToPoints(x)   ((x)/20)
  318. #define    PointsToTwips(x)   ((x)*20)
  319.  
  320. #define    MmToInches(x)       (((float)(x))/(float)25.4)
  321. #define    PrtToInchesX(x)     (((float)x)/PrtResX)
  322. #define    PrtToInchesY(x)     (((float)x)/PrtResY)
  323.  
  324. #define    ResetUintFlag(flags,flag)  ((UINT)(flags)&(~((UINT)(flag))))
  325. #define    ResetByteFlag(flags,flag)  ((BYTE)(flags)&(~((BYTE)(flag))))
  326.  
  327. /******************************************************************************
  328.                          FAR/NEAR SELECTION
  329.     Although TER is compiled in the medium model, in the Borland environment
  330.     it is linked with the large model libraries.  The following variable
  331.     defines the TERFAR constant accordingly.  This constant is used for
  332.     modifying certain library functions.
  333. *******************************************************************************/
  334. #if defined(__TURBOC__)
  335.    #ifdef __DLL__
  336.       #define TERFAR far
  337.       #define TERDLL
  338.    #else
  339.       #define TERFAR
  340.    #endif
  341.    #define DllMain DllEntryPoint
  342. #else
  343.    #ifdef _WINDLL
  344.       #define TERDLL
  345.    #endif
  346.    #define TERFAR
  347.    #define mktemp _mktemp
  348. #endif
  349.  
  350. /******************************************************************************
  351.     WIN32 specific defines
  352. *******************************************************************************/
  353. #define TERNT
  354. #if defined (TER32)
  355.    #undef  huge
  356.    #define huge
  357.    #undef  FreeProcInstance 
  358.    #define FreeProcInstance(x) 
  359.    #define GET_WM_COMMAND_ID(wp,lp) LOWORD(wp)
  360.    #define CONTROL_ID(wp,lp)        LOWORD(wp)
  361.    #define NOTIFY_MSG(wp,lp)        HIWORD(wp)
  362.    #define SCROLL_MSG(wp,lp)        LOWORD(wp)
  363.    #define THUMB_POS(wp,lp)         HIWORD(wp)
  364.    #undef  farmalloc
  365.    #define farmalloc  malloc
  366.    #undef  farrealloc
  367.    #define farrealloc realloc
  368.    #undef  farfree
  369.    #define farfree    free
  370.    #define SIGN_EOF   SIGN_EOF32
  371. #else
  372.    #define GET_WM_COMMAND_ID(wp,lp) (wp)
  373.    #define CONTROL_ID(wp,lp)        (wp)
  374.    #define NOTIFY_MSG(wp,lp)        HIWORD(lp)
  375.    #define SCROLL_MSG(wp,lp)        (wp)
  376.    #define THUMB_POS(wp,lp)         LOWORD(lp)
  377.    #define CCSTYLEFLAG DWORD
  378.    #define SIGN_EOF    SIGN_EOF16
  379. #endif
  380.  
  381.  
  382. /******************************************************************************
  383.      The following definitions are used to enhance the readability of the window
  384.      specific global variables.  For example, instead of using ((w->TerArg),
  385.      the program simply uses TerArg.
  386. *******************************************************************************/
  387.  
  388. /******************************************************************************
  389.      Text line data arrays
  390. *******************************************************************************/
  391. #define TerArg          (w->TerArgW)
  392. #define hLine           (w->hLineW)      
  393. #define LineLen         (w->LineLenW)
  394. #define LineHt          (w->LineHtW)
  395. #define LineY           (w->LineYW)
  396. #define LineX           (w->LineXW)
  397. #define LineFlags       (w->LineFlagsW)
  398. #define hhLine          (w->hhLineW)
  399. #define hLineLen        (w->hLineLenW)
  400. #define hLineHt         (w->hLineHtW)
  401. #define hLineY          (w->hLineYW)
  402. #define hLineX          (w->hLineXW)
  403. #define hLineFlags      (w->hLineFlagsW)
  404.  
  405. /******************************************************************************
  406.      Screen display control variables
  407. *******************************************************************************/
  408. #define hTerWnd         (w->hTerWndW)
  409. #define hTerDC          (w->hTerDCW)
  410. #define hScrollBM       (w->hScrollBMW)
  411. #define hPr             (w->hPrW)
  412. #define hTerRegFont     (w->hTerRegFontW)
  413. #define hTerCurFont     (w->hTerCurFontW)
  414. #define hRulerFont      (w->hRulerFontW)
  415. #define TerTextMet      (w->TerTextMetW)
  416. #define hWaitCursor     (w->hWaitCursorW)
  417. #define TerRect         (w->TerRectW)
  418. #define TerWinRect      (w->TerWinRectW)
  419. #define RulerRect       (w->RulerRectW)
  420. #define hPagePen        (w->hPagePenW)
  421. #define hColPen         (w->hColPenW)
  422. #define hRowPen         (w->hRowPenW)
  423. #define hCellPen        (w->hCellPenW)
  424.  
  425. #define CurRow          (w->CurRowW)
  426. #define CurCol          (w->CurColW)
  427. #define CurLine         (w->CurLineW)
  428. #define CurLineY        (w->CurLineYW)
  429. #define BeginLine       (w->BeginLineW)
  430. #define TotalLines      (w->TotalLinesW)
  431. #define MaxLines        (w->MaxLinesW)
  432. #define PagingMargin    (w->PagingMarginW)
  433. #define WinWidth        (w->WinWidthW)
  434. #define WinHeight       (w->WinHeightW)
  435. #define LineWidth       (w->LineWidthW)
  436. #define PaintFlag       (w->PaintFlagW)
  437. #define TabWidth        (w->TabWidthW)
  438. #define HorScrollPos    (w->HorScrollPosW)
  439. #define VerScrollPos    (w->VerScrollPosW)
  440. #define TerWinWidth     (w->TerWinWidthW)
  441. #define TerWinHeight    (w->TerWinHeightW)
  442. #define CurPageWidth    (w->CurPageWidthW)
  443. #define CurPageHeight   (w->CurPageHeightW)
  444. #define CurTextHeight   (w->CurTextHeightW)
  445. #define TerWinOrgX      (w->TerWinOrgXW)
  446. #define TerWinOrgY      (w->TerWinOrgYW)
  447. #define RulerClicked    (w->RulerClickedW)
  448. #define FontsReleased   (w->FontsReleasedW)
  449. #define WindowDestroyed (w->WindowDestroyedW)
  450. #define ReclaimResources (w->ReclaimResourcesW)
  451. #define NextX           (w->NextXW)
  452. #define NextTab         (w->NextTabW)
  453. #define NextSpace       (w->NextSpaceW)
  454. #define RulerFontHeight (w->RulerFontHeightW)
  455. #define ScrResX         (w->ScrResXW)
  456. #define ScrResY         (w->ScrResYW)
  457. #define PrtResX         (w->PrtResXW)
  458. #define PrtResY         (w->PrtResYW)
  459. #define PaintEnabled    (w->PaintEnabledW)
  460. #define WrapPending     (w->WrapPendingW)
  461. #define RulerPending    (w->RulerPendingW)
  462. #define RulerSection    (w->RulerSectionW)
  463. #define InAccelerator   (w->InAcceleratorW)
  464. #define CursHorzPos     (w->CursHorzPosW)
  465. #define OverhangFont    (w->OverhangFontW)
  466. #define PaintBegLine    (w->PaintBegLineW)
  467. #define PaintEndLine    (w->PaintEndLineW)
  468. #define WinYOffset      (w->WinYOffsetW)
  469. #define WinYOffsetLine  (w->WinYOffsetLineW)
  470. #define CommandId       (w->CommandIdW)
  471. #define RepaintNo       (w->RepaintNoW)
  472.  
  473. #define CrNewLine       (w->CrNewLineW)
  474. #define CrSplitLine     (w->CrSplitLineW)
  475. #define TabAlign        (w->TabAlignW)
  476. #define JoinLines       (w->JoinLinesW)
  477. #define Notified        (w->NotifiedW)
  478.  
  479. #define StatusRowPos    (w->StatusRowPosW)
  480. #define StatusColPos    (w->StatusColPosW)
  481. #define StatusLinePos   (w->StatusLinePosW)
  482.  
  483. #define CurClipRgn      (w->CurClipRgnW)
  484.  
  485. /******************************************************************************
  486.      Text Frame Variables
  487. *******************************************************************************/
  488. #define hFrame          (w->hFrameW)
  489. #define frame           (w->frameW)
  490. #define CurFrame        (w->CurFrameW)
  491. #define TotalFrames     (w->TotalFramesW)
  492. #define MaxFrames       (w->MaxFramesW)
  493. #define FirstTextFrame  (w->FirstTextFrameW)
  494. #define LastTextFrame   (w->LastTextFrameW)
  495.  
  496. /******************************************************************************
  497.                     Text to Screen mapping variables 
  498. *******************************************************************************/
  499. #define RowY            (w->RowYW)
  500. #define RowHeight       (w->RowHeightW)
  501. #define RowX            (w->RowXW)
  502.  
  503. /******************************************************************************
  504.                        Text segment structure
  505. *******************************************************************************/
  506. #define TextSeg         (w->TextSegW)
  507. #define hTextSeg        (w->hTextSegW)
  508. #define TotalSegments   (w->TotalSegmentsW)
  509. #define UseTextMap      (w->UseTextMapW)
  510. #define TextBorder      (w->TextBorderW)
  511. #define ParaShading     (w->ParaShadingW)
  512. #define ParaFrameSpace  (w->ParaFrameSpaceW)
  513.  
  514. /******************************************************************************
  515.      Mouse control variables
  516. *******************************************************************************/
  517. #define MouseCol        (w->MouseColW)
  518. #define MouseLine       (w->MouseLineW)
  519. #define MouseX          (w->MouseXW)
  520. #define MouseY          (w->MouseYW)
  521. #define MouseOverShoot  (w->MouseOverShootW)
  522. #define IgnoreMouseMove    (w->IgnoreMouseMoveW)
  523. #define VerySmallMovement  (w->VerySmallMovementW)
  524.  
  525. /******************************************************************************
  526.      Word Wrapping related variables
  527. *******************************************************************************/
  528. #define DocCode           (w->DocCodeW)
  529. #define DocBegin          (w->DocBeginW)
  530. #define WrapMaxLines      (w->WrapMaxLinesW)
  531. #define WrapBufferSize    (w->WrapBufferSizeW)
  532. #define ParaChar          (w->ParaCharW)
  533. #define DocExt            (w->DocExtW)
  534. #define wrap              (w->wrapW)
  535. #define hWrap             (w->hWrapW)
  536. #define BufferLength      (w->BufferLengthW)
  537. #define MaxBufferLength   (w->MaxBufferLengthW)
  538. #define LastBufferedLine  (w->LastBufferedLineW)
  539. #define LastWrappedLine   (w->LastWrappedLineW)
  540. #define WrapFlag          (w->WrapFlagW)
  541.  
  542. /*****************************************************************************
  543.                    Character Formatting Variables
  544. ******************************************************************************/
  545. #define CfmtSign          (w->CfmtSignW)
  546. #define cfmt              (w->cfmtW)
  547. #define hCfmt             (w->hCfmtW)
  548. #define WrapCfmt          (w->WrapCfmtW)
  549. #define hWrapCfmt         (w->hWrapCfmtW)
  550. #define TempCfmt          (w->TempCfmtW)
  551. #define CurFmtId          (w->CurFmtIdW)
  552. #define InputFontId       (w->InputFontIdW)
  553.  
  554. /******************************************************************************
  555.                     Paragraph formatting variables
  556. ******************************************************************************/
  557. #define hPfmt             (w->hPfmtW)
  558. #define pfmt              (w->pfmtW)
  559. #define hPfmtId           (w->hPfmtIdW)
  560. #define PfmtId            (w->PfmtIdW)
  561. #define TotalPfmts        (w->TotalPfmtsW)
  562. #define CurPfmt           (w->CurPfmtW)
  563. #define CurWrapPfmt       (w->CurWrapPfmtW)
  564. #define tabw              (w->tabwW)
  565. #define hTabw             (w->hTabwW)
  566.  
  567. /******************************************************************************
  568.                        Font and Picture Control Data
  569. ******************************************************************************/
  570. #define FmtSign           (w->FmtSignW)
  571. #define FmtSignOld        (w->FmtSignOldW)
  572. #define TerFont           (w->TerFontW)
  573. #define hTerFont          (w->hTerFontW)
  574. #define PrtFont           (w->PrtFontW)
  575. #define hPrtFont          (w->hPrtFontW)
  576. #define TerTab            (w->TerTabW)
  577. #define hTerTab           (w->hTerTabW)
  578. #define TerSect           (w->TerSectW)
  579. #define hTerSect          (w->hTerSectW)
  580. #define TerSect1          (w->TerSect1W)
  581. #define hTerSect1         (w->hTerSect1W)
  582. #define TotalFonts        (w->TotalFontsW)
  583. #define UsingZoomFonts    (w->UsingZoomFontsW)
  584. #define TotalTypes        (w->TotalTypesW)
  585. #define TotalPointSizes   (w->TotalPointSizesW)
  586. #define TotalTabs         (w->TotalTabsW)
  587. #define DefTabWidth       (w->DefTabWidthW)
  588. #define TotalSects        (w->TotalSectsW)
  589. #define WrapSect          (w->WrapSectW)
  590. #define SectModified      (w->SectModifiedW)
  591. #define ReqTypeFace       (w->ReqTypeFaceW)
  592. #define ReqPointSize      (w->ReqPointSizeW)
  593.  
  594. /******************************************************************************
  595.      Print control variables
  596. *******************************************************************************/
  597. #define PageWidth         (w->PageWidthW)
  598. #define PageHeight        (w->PageHeightW)
  599. #define PageX             (w->PageXW)
  600. #define AbortPrint        (w->AbortPrintW)
  601. #define InPrinting        (w->InPrintingW)
  602. #define InPrintPreview    (w->InPrintPreviewW)
  603. #define PrinterAvailable  (w->PrinterAvailableW)
  604. #define PrinterName       (w->PrinterNameW)
  605. #define PrinterDriver     (w->PrinterDriverW)
  606. #define PrinterPort       (w->PrinterPortW)
  607. #define hDevMode          (w->hDevModeW)
  608. #define pDevMode          (w->pDevModeW)
  609. #define hAbortWnd         (w->hAbortWndW)
  610. #define TotalPreviewPages (w->TotalPreviewPagesW)
  611. #define PreviewZoom       (w->PreviewZoomW)
  612. #define PreviewHeight     (w->PreviewHeightW)
  613. #define PreviewWidth      (w->PreviewWidthW)
  614. #define SavePvStatus      (w->SavePvStatusW)
  615. #define SavePvRuler       (w->SavePvRulerW)
  616. #define SavePvToolbar     (w->SavePvToolbarW)
  617. #define SavePvWordWrap    (w->SavePvWordWrapW)
  618. #define SavePvPrintView   (w->SavePvPrintViewW)
  619. #define SavePvPageMode    (w->SavePvPageModeW)
  620. #define SavePvShowHorBar  (w->SavePvShowHorBarW)
  621. #define SavePvOrgX        (w->SavePvOrgXW)
  622. #define SavePvOrgY        (w->SavePvOrgYW)
  623. #define SavePvViewPageHdrFtr (w->SavePvViewPageHdrFtrW)
  624. #define ZoomSubclassProc  (w->ZoomSubclassProcW)
  625. #define OrigZoomSubclassProc (w->OrigZoomSubclassProcW)
  626.  
  627. /******************************************************************************
  628.      Cursor adjustment variables
  629. ******************************************************************************/
  630. #define PrevCursLine    (w->PrevCursLineW)
  631. #define PrevCursCol     (w->PrevCursColW)
  632. #define PrevCursPage    (w->PrevCursPageW)
  633. #define PrevCursLineY   (w->PrevCursLineYW)
  634. #define CursDirection   (w->CursDirectionW)
  635.  
  636. /******************************************************************************
  637.      Color control variables
  638. ******************************************************************************/
  639. #define TextDefBkColor    (w->TextDefBkColorW)
  640. #define StatusBkColor     (w->StatusBkColorW)
  641. #define StatusColor       (w->StatusColorW)
  642. #define CurForeColor      (w->CurForeColorW)
  643. #define CurBackColor      (w->CurBackColorW)
  644. #define FrameShading      (w->FrameShadingW)
  645. #define hTextBrush        (w->hTextBrushW)
  646. #define hHilightBrush     (w->hHilightBrushW)
  647. #define hStatusBrush      (w->hStatusBrushW)
  648.  
  649. /******************************************************************************
  650.      Block highlighting variables
  651. ******************************************************************************/
  652. #define HilightType       (w->HilightTypeW)
  653. #define HilightBegRow     (w->HilightBegRowW)
  654. #define HilightEndRow     (w->HilightEndRowW)
  655. #define HilightBegCol     (w->HilightBegColW)
  656. #define HilightEndCol     (w->HilightEndColW)
  657. #define MaxColBlock       (w->MaxColBlockW)
  658. #define StretchHilight    (w->StretchHilightW)
  659.  
  660. /******************************************************************************
  661.      Tool Bar Variables
  662. *******************************************************************************/
  663. #define ToolBarHeight     (w->ToolBarHeightW)
  664. #define hToolBarWnd       (w->hToolBarWndW)
  665. #define hPvToolBarWnd     (w->hPvToolBarWndW)
  666. #define lpToolBar         (w->lpToolBarW)
  667. #define ToolBarCfmt       (w->ToolBarCfmtW)
  668. #define ToolBarPfmt       (w->ToolBarPfmtW)
  669. #define ToolBarFontProc   (w->ToolBarFontProcW)
  670. #define OrigBarFontProc   (w->OrigBarFontProcW)
  671. #define ToolBarPointProc  (w->ToolBarPointProcW)
  672. #define OrigBarPointProc  (w->OrigBarPointProcW)
  673.  
  674. /******************************************************************************
  675.      Search/Replace Variables
  676. *******************************************************************************/
  677. #define SearchString      (w->SearchStringW)
  678. #define SearchDirection   (w->SearchDirectionW)
  679. #define ReplaceString     (w->ReplaceStringW)
  680. #define ReplaceWith       (w->ReplaceWithW)
  681. #define SearchFlags       (w->SearchFlagsW)
  682. #define ReplaceVerify     (w->ReplaceVerifyW)
  683. #define ReplaceBlock      (w->ReplaceBlockW)
  684.  
  685. /******************************************************************************
  686.      Undo variables
  687. *******************************************************************************/
  688. #define hUndo             (w->hUndoW)
  689. #define hUndoCfmt         (w->hUndoCfmtW)
  690. #define UndoBeg           (w->UndoBegW)
  691. #define UndoEnd           (w->UndoEndW)
  692. #define UndoExists        (w->UndoExistsW)
  693. #define UndoType          (w->UndoTypeW)
  694.  
  695. /******************************************************************************
  696.      Mail merge text variables
  697. *******************************************************************************/
  698. #define merge    (w->mergeW)
  699.  
  700. /******************************************************************************
  701.      Hidden text variables
  702. *******************************************************************************/
  703. #define ShowHiddenText    (w->ShowHiddenTextW)
  704.  
  705. /******************************************************************************
  706.      Paragraph Border and spacing variables
  707. *******************************************************************************/
  708. #define BoxLeft        (w->BoxLeftW)
  709. #define BoxRight       (w->BoxRightW)
  710. #define DlgOnFlags     (w->DlgOnFlagsW)
  711. #define DlgOffFlags    (w->DlgOffFlagsW)
  712. #define DlgLong        (w->DlgLongW)
  713. #define DlgInt1        (w->DlgInt1W)
  714. #define DlgInt2        (w->DlgInt2W)
  715. #define DlgInt3        (w->DlgInt3W)
  716. #define SpaceBef       (w->SpaceBefW)
  717. #define SpaceAft       (w->SpaceAftW)
  718.  
  719. /******************************************************************************
  720.      Paragraph Frame variables
  721. *******************************************************************************/
  722. #define ParaFrame       (w->ParaFrameW)
  723. #define hParaFrame      (w->hParaFrameW)
  724. #define CurParaFrame    (w->CurParaFrameW)
  725. #define TotalParaFrames (w->TotalParaFramesW)
  726. #define ContainsParaFrames (w->ContainsParaFramesW)
  727.  
  728. /******************************************************************************
  729.      OLE Variables
  730. *******************************************************************************/
  731. #define TerClient      (w->TerClientW)
  732. #define TerClientVtbl  (w->TerClientVtblW)
  733. #define OleStream      (w->OleStreamW)
  734. #define OleStreamVtbl  (w->OleStreamVtblW)
  735. #define lhDoc          (w->lhDocW)
  736. #define WaitForOle     (w->WaitForOleW)
  737. #define OleReleaseMethod (w->OleReleaseMethodW)
  738. #define hOleData       (w->hOleDataW)
  739. #define pOleData       (w->pOleDataW)
  740. #define CurObject      (w->CurObjectW)
  741. #define pDocStorage    (w->pDocStorageW)
  742.  
  743. /******************************************************************************
  744.      VBX Variables
  745. *******************************************************************************/
  746. #define VbxControl          (w->VbxControlW)
  747. #define VbxMessageProcessed (w->VbxMessageProcessedW)
  748. #define VbxCallback         (w->VbxCallbackW)
  749.  
  750. /******************************************************************************
  751.      Drag object Variables
  752. *******************************************************************************/
  753. #define DragObj             (w->DragObjW)
  754. #define hDragObj            (w->hDragObjW)
  755. #define CurDragObj          (w->CurDragObjW)
  756. #define CurHotSpot          (w->CurHotSpotW)
  757. #define TotalDragObjs       (w->TotalDragObjsW)
  758. #define PictureHilighted    (w->PictureHilightedW)
  759. #define FrameTabsHilighted  (w->FrameTabsHilightedW)
  760. #define FrameRectHilighted  (w->FrameRectHilightedW)
  761. #define PictureClicked      (w->PictureClickedW)
  762. #define FrameClicked        (w->FrameClickedW)
  763. #define hFocusPen           (w->hFocusPenW)
  764.  
  765. /******************************************************************************
  766.      Table Variables
  767. *******************************************************************************/
  768. #define TableRow             (w->TableRowW)
  769. #define cell                 (w->cellW)
  770. #define hTableRow            (w->hTableRowW)
  771. #define hCell                (w->hCellW)
  772. #define TotalTableRows       (w->TotalTableRowsW)
  773. #define TotalCells           (w->TotalCellsW)
  774. #define TableRows            (w->TableRowsW)
  775. #define TableCols            (w->TableColsW)
  776. #define CellChar             (w->CellCharW)
  777. #define FrameCellId          (w->FrameCellIdW)
  778. #define FrameRowId           (w->FrameRowIdW)
  779. #define FrameHeight          (w->FrameHeightW)
  780. #define ShowTableGridLines   (w->ShowTableGridLinesW)
  781.  
  782. /******************************************************************************
  783.      RTF Control Variables
  784. ******************************************************************************/
  785. #define RtfCurRowId          (w->RtfCurRowIdW)
  786. #define RtfCurCellId         (w->RtfCurCellIdW)
  787. #define RtfParaFID           (w->RtfParaFIDW)
  788. #define RtfParaFrameInfo     (w->RtfParaFrameInfoW)
  789. #define RtfLastCellId        (w->RtfLastCellIdW)
  790. #define RtfInTable           (w->RtfInTableW)
  791. #define RtfInHdrFtr          (w->RtfInHdrFtrW)
  792.  
  793. /******************************************************************************
  794.      Page Header/Footer Variables
  795. ******************************************************************************/
  796. #define ViewPageHdrFtr       (w->ViewPageHdrFtrW)
  797. #define EditPageHdrFtr       (w->EditPageHdrFtrW)
  798. #define PosPageHdrFtr        (w->PosPageHdrFtrW)
  799. #define HdrFirstPageLine     (w->HdrFirstPageLineW)
  800. #define HdrLastPageLine      (w->HdrLastPageLineW)
  801. #define FtrFirstPageLine     (w->FtrFirstPageLineW)
  802. #define FtrLastPageLine      (w->FtrLastPageLineW)
  803.  
  804. /******************************************************************************
  805.      Caret Variables
  806. *******************************************************************************/
  807. #define CaretHeight      (w->CaretHeightW)
  808. #define CaretEnabled     (w->CaretEnabledW)
  809. #define CaretHidden      (w->CaretHiddenW)
  810. #define CaretPositioned  (w->CaretPositionedW)
  811. #define CaretEngaged     (w->CaretEngagedW)
  812. #define CaretPos         (w->CaretPosW)
  813. #define CaretPage        (w->CaretPageW)
  814. #define ShowProtectCaret (w->ShowProtectCaretW)
  815.  
  816. /******************************************************************************
  817.      Other Variables
  818. *******************************************************************************/
  819. #define BreakChars        (w->BreakCharsW)
  820. #define FileInfo          (w->FileInfoW)
  821. #define InsertMode        (w->InsertModeW)
  822. #define TerHelpWanted     (w->TerHelpWantedW)
  823. #define WindowBeingCreated (w->WindowBeingCreatedW)
  824. #define CrLfUsed          (w->CrLfUsedW)
  825. #define ProtectionLock    (w->ProtectionLockW)
  826. #define ShowParaMark      (w->ShowParaMarkW)
  827.                                                     
  828. #define TerHelpFile       (w->TerHelpFileW)
  829. #define hTerAccTable      (w->hTerAccTableW)
  830.  
  831. #define RtfClipFormat        (w->RtfClipFormatW)
  832. #define NativeClipFormat     (w->NativeClipFormatW)
  833. #define ObjectLinkClipFormat (w->ObjectLinkClipFormatW)
  834. #define OwnerLinkClipFormat  (w->OwnerLinkClipFormatW)
  835.  
  836. #define FileFormat        (w->FileFormatW)
  837. #define RtfInput          (w->RtfInputW)
  838.  
  839. #define TotalPages        (w->TotalPagesW)
  840. #define MaxPages          (w->MaxPagesW)
  841. #define PageModifyCount   (w->PageModifyCountW)
  842. #define CurPage           (w->CurPageW)
  843. #define PageLine          (w->PageLineW)
  844. #define hPageLine         (w->hPageLineW)
  845. #define RepageBeginLine   (w->RepageBeginLineW)
  846. #define repaginating      (w->repaginatingW)
  847. #define SpeedKeyEnabled   (w->SpeedKeyEnabledW)
  848. #define ShowHyperlinkCursor (w->ShowHyperlinkCursorW)
  849. #define MatchIds          (w->MatchIdsW)
  850. #define hAppMemory        (w->hAppMemoryW)
  851. #define pAppMemory        (w->pAppMemoryW)
  852. #define ModifyProtectColor (w->ModifyProtectColorW)
  853. #define LinkStyle         (w->LinkStyleW)
  854. #define LinkColor         (w->LinkColorW)
  855. #define LinkDblClick      (w->LinkDblClickW)
  856.  
  857.