KeyView 23.2

# Macros

Some of the macros are simple while others are complicated. An example of a simple macro is `ParaEnd (pcBuf)` which terminates the current paragraph.

    #define ParaEnd(pcBuf)                                   \
            {                                                \
                *pcBuf++ = KVT_PARA_BREAK;                   \
                 KVT_PUTINT(pcBuf, KVTSIZE_PARA_BREAK);      \
            }

In Filter SDK, this generates an `0x0d`, `0x0a` pair of bytes on a Windows machine. In HTML Export this can generate a `<p style="…">` element, depending on the value of other paragraph attributes.

One of the more complicated macros is `PutPictureEx()`.

    #define PutPictureEx(pcBuf, lpszKey, cx, cy, flags,             \
                 scaleHeight, scaleWidth,                           \
                 cropFromL, cropFromT, cropFromR, cropFromB,        \
                 anchorHorizontal, anchorVertical, offsetX, offsetY)\
              {                                                     \
                 PutPic(pcBuf, lpszKey, cx, cy, flags,              \
                 scaleHeight, scaleWidth,                           \
                 cropFromL, cropFromT, cropFromR, cropFromB,        \
                 anchorHorizontal, anchorVertical, offsetX, offsetY,\
                 180, 0, 180, 0, -1, 0, 0, 0, 0)                    \
              }

You can generate a representation of the token stream by running `filtertest.exe` with the `-d` command-line option. This stream does not include the tokens generated for headers or footers. The `filtertest.exe` is in the directory `install\samples\utf8\bin`, where `install` is the path name of the Filter installation directory.

Copyright 2016-2023 Open Text
Version 23.2 | Last updated March 2023

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL KeyView 23.2

Topic Title: Macros