home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Unleashed / Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso / tedevkit / tvb.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-11  |  7.7 KB  |  287 lines

  1. #include "tvb_def.h"          // macro definitions
  2.  
  3. /******************************************************************************
  4.     The following structure is allocated for each window.  The structure
  5.     contains the global variables required for a window.  This structure
  6.     is deallocated when the window is closed.
  7. *******************************************************************************/
  8. typedef struct StrTvb {
  9.     int  temp;
  10. }TVBWND;
  11.  
  12. typedef TVBWND far *PTVBWND;             // pointer to the control window variable structure 
  13.  
  14.  
  15. /******************************************************************************
  16.     Common Variables
  17. *******************************************************************************/
  18. PREFIX MODEL    model;                   // model structure
  19.  
  20. PREFIX HANDLE   hTvbInst;                // DLr instance id 
  21. PREFIX char     TempString[MAX_WIDTH+1], // temporary holding place 
  22.                 TempString1[MAX_WIDTH+1];// temporary holding place 
  23.  
  24. /*******************************************************************************
  25.     Control Parameter Structure
  26. ********************************************************************************/
  27. struct StrCtl {
  28.        DWORD style;                      // TER control styles
  29.        BOOL  repaint;                    // TRUE to repaint after each API calls
  30.     };
  31. typedef struct StrCtl far *LPCTL;
  32.  
  33. /*******************************************************************************
  34.     Design Time Property Definitions
  35. ********************************************************************************/
  36. PROPINFO PropWordWrap = {
  37.    "Word Wrap",
  38.    DT_BOOL|PF_fGetMsg|PF_fSetMsg|PF_fPreHwnd|PF_fSaveData|PF_fNoRuntimeW,
  39.    0,0,0,NULL,0
  40.    };
  41.  
  42. PROPINFO PropVScroll = {
  43.    "Vert Scroll Bar",
  44.    DT_BOOL|PF_fGetMsg|PF_fSetMsg|PF_fPreHwnd|PF_fSaveData|PF_fNoRuntimeW,
  45.    0,0,0,NULL,0
  46.    };
  47.  
  48. PROPINFO PropHScroll = {
  49.    "Horz Scroll Bar",
  50.    DT_BOOL|PF_fGetMsg|PF_fSetMsg|PF_fPreHwnd|PF_fSaveData|PF_fNoRuntimeW,
  51.    0,0,0,NULL,0
  52.    };
  53.  
  54. PROPINFO PropPrintView = {
  55.    "Print View Mode",
  56.    DT_BOOL|PF_fGetMsg|PF_fSetMsg|PF_fPreHwnd|PF_fSaveData|PF_fNoRuntimeW,
  57.    0,0,0,NULL,0
  58.    };
  59.  
  60. PROPINFO PropShowStatus = {
  61.    "Show Status Bar",
  62.    DT_BOOL|PF_fGetMsg|PF_fSetMsg|PF_fPreHwnd|PF_fSaveData|PF_fNoRuntimeW,
  63.    0,0,0,NULL,0
  64.    };
  65.  
  66. PROPINFO PropShowRuler = {
  67.    "Show Ruler",
  68.    DT_BOOL|PF_fGetMsg|PF_fSetMsg|PF_fPreHwnd|PF_fSaveData|PF_fNoRuntimeW,
  69.    0,0,0,NULL,0
  70.    };
  71.  
  72. PROPINFO PropBorderMargin = {
  73.    "Border Margin",
  74.    DT_BOOL|PF_fGetMsg|PF_fSetMsg|PF_fPreHwnd|PF_fSaveData|PF_fNoRuntimeW,
  75.    0,0,0,NULL,0
  76.    };
  77.  
  78. PROPINFO PropOutputRtf = {
  79.    "RTF Output",
  80.    DT_BOOL|PF_fGetMsg|PF_fSetMsg|PF_fPreHwnd|PF_fSaveData|PF_fNoRuntimeW,
  81.    0,0,0,NULL,0
  82.    };
  83.  
  84. PROPINFO PropReadOnly = {
  85.    "Read Only Mode",
  86.    DT_BOOL|PF_fGetMsg|PF_fSetMsg|PF_fPreHwnd|PF_fSaveData|PF_fNoRuntimeW,
  87.    0,0,0,NULL,0
  88.    };
  89.  
  90. PROPINFO PropPageMode = {
  91.    "Page Mode",
  92.    DT_BOOL|PF_fGetMsg|PF_fSetMsg|PF_fPreHwnd|PF_fSaveData|PF_fNoRuntimeW,
  93.    0,0,0,NULL,0
  94.    };
  95.  
  96. PROPINFO PropShowToolBar = {
  97.    "Show Tool Bar",
  98.    DT_BOOL|PF_fGetMsg|PF_fSetMsg|PF_fPreHwnd|PF_fSaveData|PF_fNoRuntimeW,
  99.    0,0,0,NULL,0
  100.    };
  101.  
  102. /*******************************************************************************
  103.     Run Time Property Definitions
  104. ********************************************************************************/
  105. PROPINFO PropData = {
  106.    "Data",
  107.    DT_HLSTR|PF_fGetMsg|PF_fSetMsg|PF_fNoShow,
  108.    0,0,0,NULL,0
  109.    };
  110.  
  111. PROPINFO PropRepaint = {
  112.    "Repaint",
  113.    DT_BOOL|PF_fGetMsg|PF_fSetMsg|PF_fNoShow,
  114.    0,0,0,NULL,0
  115.    };
  116.  
  117. PROPINFO PropSetCharStyle = {
  118.    "SetCharStyle",
  119.    DT_LONG|PF_fGetMsg|PF_fSetMsg|PF_fNoShow|PF_fNoRuntimeR,
  120.    0,0,0,NULL,0
  121.    };
  122.  
  123. PROPINFO PropResetCharStyle = {
  124.    "ResetCharStyle",
  125.    DT_LONG|PF_fGetMsg|PF_fSetMsg|PF_fNoShow|PF_fNoRuntimeR,
  126.    0,0,0,NULL,0
  127.    };
  128.  
  129. PROPINFO PropParaReset = {
  130.    "ParaReset",
  131.    DT_BOOL|PF_fGetMsg|PF_fSetMsg|PF_fNoShow|PF_fNoRuntimeR,
  132.    0,0,0,NULL,0
  133.    };
  134.  
  135. PROPINFO PropParaStyle = {
  136.    "ParaStyle",
  137.    DT_LONG|PF_fGetMsg|PF_fSetMsg|PF_fNoShow|PF_fNoRuntimeR,
  138.    0,0,0,NULL,0
  139.    };
  140.  
  141. PROPINFO PropParaIndentLeft = {
  142.    "ParaIndentLeft",
  143.    DT_LONG|PF_fGetMsg|PF_fSetMsg|PF_fNoShow|PF_fNoRuntimeR,
  144.    0,0,0,NULL,0
  145.    };
  146.  
  147. PROPINFO PropParaIndentRight = {
  148.    "ParaIndentRight",
  149.    DT_LONG|PF_fGetMsg|PF_fSetMsg|PF_fNoShow|PF_fNoRuntimeR,
  150.    0,0,0,NULL,0
  151.    };
  152.  
  153. PROPINFO PropParaIndentHanging = {
  154.    "ParaIndentHanging",
  155.    DT_LONG|PF_fGetMsg|PF_fSetMsg|PF_fNoShow|PF_fNoRuntimeR,
  156.    0,0,0,NULL,0
  157.    };
  158.  
  159. PROPINFO PropSaveFormat = {
  160.    "SaveFormat",
  161.    DT_LONG|PF_fGetMsg|PF_fSetMsg|PF_fNoShow|PF_fNoRuntimeR,
  162.    0,0,0,NULL,0
  163.    };
  164.  
  165. PROPINFO PropCommand = {
  166.    "Command",
  167.    DT_LONG|PF_fGetMsg|PF_fSetMsg|PF_fNoShow|PF_fNoRuntimeR,
  168.    0,0,0,NULL,0
  169.    };
  170.  
  171. PROPINFO PropReadFile = {
  172.    "ReadFile",
  173.    DT_HLSTR|PF_fGetMsg|PF_fSetMsg|PF_fNoShow|PF_fNoRuntimeR,
  174.    0,0,0,NULL,0
  175.    };
  176.  
  177. PROPINFO PropSaveFile = {
  178.    "SaveFile",
  179.    DT_HLSTR|PF_fGetMsg|PF_fSetMsg|PF_fNoShow|PF_fNoRuntimeR,
  180.    0,0,0,NULL,0
  181.    };
  182.  
  183. /*******************************************************************************
  184.     Property Table
  185. ********************************************************************************/
  186. PPROPINFO TvbProp[] =
  187. {
  188.     PPROPINFO_STD_CTLNAME,
  189.     PPROPINFO_STD_LEFT,
  190.     PPROPINFO_STD_TOP,
  191.     PPROPINFO_STD_WIDTH,
  192.     PPROPINFO_STD_HEIGHT,
  193.     PPROPINFO_STD_VISIBLE,
  194.     PPROPINFO_STD_HWND,
  195.  
  196.     (PPROPINFO) &PropWordWrap,
  197.     (PPROPINFO) &PropVScroll,
  198.     (PPROPINFO) &PropHScroll,
  199.     (PPROPINFO) &PropPrintView,
  200.     (PPROPINFO) &PropShowStatus,
  201.     (PPROPINFO) &PropShowRuler,
  202.     (PPROPINFO) &PropBorderMargin,
  203.     (PPROPINFO) &PropOutputRtf,
  204.     (PPROPINFO) &PropReadOnly,
  205.     (PPROPINFO) &PropPageMode,
  206.     (PPROPINFO) &PropShowToolBar,
  207.  
  208.     (PPROPINFO) &PropData,
  209.     (PPROPINFO) &PropRepaint,
  210.     (PPROPINFO) &PropSetCharStyle,
  211.     (PPROPINFO) &PropResetCharStyle,
  212.     (PPROPINFO) &PropParaReset,
  213.     (PPROPINFO) &PropParaStyle,
  214.     (PPROPINFO) &PropParaIndentLeft,
  215.     (PPROPINFO) &PropParaIndentRight,
  216.     (PPROPINFO) &PropParaIndentHanging,
  217.  
  218.     (PPROPINFO) &PropSaveFormat,
  219.     (PPROPINFO) &PropCommand,
  220.  
  221.     (PPROPINFO) &PropReadFile,
  222.     (PPROPINFO) &PropSaveFile,
  223.  
  224.     NULL
  225. };
  226.  
  227. /*******************************************************************************
  228.     Custom events
  229. ********************************************************************************/
  230.  
  231. WORD ParamHypertext[] = {ET_HLSTR, ET_HLSTR};
  232. EVENTINFO EventHypertext = {
  233.    "Hypertext",
  234.    2,
  235.    4,
  236.    ParamHypertext,
  237.    "HText as String, HCode as String"
  238.    };
  239.  
  240. WORD ParamKeyDown[] = {ET_I2};
  241. EVENTINFO EventKeyDown = {
  242.    "KeyDown",
  243.    1,
  244.    2,
  245.    ParamKeyDown,
  246.    "KeyCode as Integer"
  247.    };
  248.  
  249. WORD ParamKeyUp[] = {ET_I2};
  250. EVENTINFO EventKeyUp = {
  251.    "KeyUp",
  252.    1,
  253.    2,
  254.    ParamKeyUp,
  255.    "KeyCode as Integer"
  256.    };
  257.  
  258. WORD ParamKeyPress[] = {ET_I2};
  259. EVENTINFO EventKeyPress = {
  260.    "KeyPress",
  261.    1,
  262.    2,
  263.    ParamKeyPress,
  264.    "KeyCode as Integer"
  265.    };
  266.  
  267. /*******************************************************************************
  268.     Event Table
  269. ********************************************************************************/
  270. PEVENTINFO TvbEvent[] =
  271. {
  272.     PEVENTINFO_STD_CLICK,
  273.     PEVENTINFO_STD_DBLCLICK,
  274.     PEVENTINFO_STD_GOTFOCUS,
  275.     PEVENTINFO_STD_LOSTFOCUS,
  276.     (PEVENTINFO) &EventHypertext,
  277.     (PEVENTINFO) &EventKeyDown,
  278.     (PEVENTINFO) &EventKeyUp,
  279.     (PEVENTINFO) &EventKeyPress,
  280.     NULL
  281. };
  282.  
  283. /*******************************************************************************
  284.     Function Prototypes
  285. ********************************************************************************/
  286. #include "tvb_prot.h"
  287.