home *** CD-ROM | disk | FTP | other *** search
- #include "tvb_def.h" // macro definitions
-
- /******************************************************************************
- The following structure is allocated for each window. The structure
- contains the global variables required for a window. This structure
- is deallocated when the window is closed.
- *******************************************************************************/
- typedef struct StrTvb {
- int temp;
- }TVBWND;
-
- typedef TVBWND far *PTVBWND; // pointer to the control window variable structure
-
-
- /******************************************************************************
- Common Variables
- *******************************************************************************/
- PREFIX MODEL model; // model structure
-
- PREFIX HANDLE hTvbInst; // DLr instance id
- PREFIX char TempString[MAX_WIDTH+1], // temporary holding place
- TempString1[MAX_WIDTH+1];// temporary holding place
-
- /*******************************************************************************
- Control Parameter Structure
- ********************************************************************************/
- struct StrCtl {
- DWORD style; // TER control styles
- BOOL repaint; // TRUE to repaint after each API calls
- };
- typedef struct StrCtl far *LPCTL;
-
- /*******************************************************************************
- Design Time Property Definitions
- ********************************************************************************/
- PROPINFO PropWordWrap = {
- "Word Wrap",
- DT_BOOL|PF_fGetMsg|PF_fSetMsg|PF_fPreHwnd|PF_fSaveData|PF_fNoRuntimeW,
- 0,0,0,NULL,0
- };
-
- PROPINFO PropVScroll = {
- "Vert Scroll Bar",
- DT_BOOL|PF_fGetMsg|PF_fSetMsg|PF_fPreHwnd|PF_fSaveData|PF_fNoRuntimeW,
- 0,0,0,NULL,0
- };
-
- PROPINFO PropHScroll = {
- "Horz Scroll Bar",
- DT_BOOL|PF_fGetMsg|PF_fSetMsg|PF_fPreHwnd|PF_fSaveData|PF_fNoRuntimeW,
- 0,0,0,NULL,0
- };
-
- PROPINFO PropPrintView = {
- "Print View Mode",
- DT_BOOL|PF_fGetMsg|PF_fSetMsg|PF_fPreHwnd|PF_fSaveData|PF_fNoRuntimeW,
- 0,0,0,NULL,0
- };
-
- PROPINFO PropShowStatus = {
- "Show Status Bar",
- DT_BOOL|PF_fGetMsg|PF_fSetMsg|PF_fPreHwnd|PF_fSaveData|PF_fNoRuntimeW,
- 0,0,0,NULL,0
- };
-
- PROPINFO PropShowRuler = {
- "Show Ruler",
- DT_BOOL|PF_fGetMsg|PF_fSetMsg|PF_fPreHwnd|PF_fSaveData|PF_fNoRuntimeW,
- 0,0,0,NULL,0
- };
-
- PROPINFO PropBorderMargin = {
- "Border Margin",
- DT_BOOL|PF_fGetMsg|PF_fSetMsg|PF_fPreHwnd|PF_fSaveData|PF_fNoRuntimeW,
- 0,0,0,NULL,0
- };
-
- PROPINFO PropOutputRtf = {
- "RTF Output",
- DT_BOOL|PF_fGetMsg|PF_fSetMsg|PF_fPreHwnd|PF_fSaveData|PF_fNoRuntimeW,
- 0,0,0,NULL,0
- };
-
- PROPINFO PropReadOnly = {
- "Read Only Mode",
- DT_BOOL|PF_fGetMsg|PF_fSetMsg|PF_fPreHwnd|PF_fSaveData|PF_fNoRuntimeW,
- 0,0,0,NULL,0
- };
-
- PROPINFO PropPageMode = {
- "Page Mode",
- DT_BOOL|PF_fGetMsg|PF_fSetMsg|PF_fPreHwnd|PF_fSaveData|PF_fNoRuntimeW,
- 0,0,0,NULL,0
- };
-
- PROPINFO PropShowToolBar = {
- "Show Tool Bar",
- DT_BOOL|PF_fGetMsg|PF_fSetMsg|PF_fPreHwnd|PF_fSaveData|PF_fNoRuntimeW,
- 0,0,0,NULL,0
- };
-
- /*******************************************************************************
- Run Time Property Definitions
- ********************************************************************************/
- PROPINFO PropData = {
- "Data",
- DT_HLSTR|PF_fGetMsg|PF_fSetMsg|PF_fNoShow,
- 0,0,0,NULL,0
- };
-
- PROPINFO PropRepaint = {
- "Repaint",
- DT_BOOL|PF_fGetMsg|PF_fSetMsg|PF_fNoShow,
- 0,0,0,NULL,0
- };
-
- PROPINFO PropSetCharStyle = {
- "SetCharStyle",
- DT_LONG|PF_fGetMsg|PF_fSetMsg|PF_fNoShow|PF_fNoRuntimeR,
- 0,0,0,NULL,0
- };
-
- PROPINFO PropResetCharStyle = {
- "ResetCharStyle",
- DT_LONG|PF_fGetMsg|PF_fSetMsg|PF_fNoShow|PF_fNoRuntimeR,
- 0,0,0,NULL,0
- };
-
- PROPINFO PropParaReset = {
- "ParaReset",
- DT_BOOL|PF_fGetMsg|PF_fSetMsg|PF_fNoShow|PF_fNoRuntimeR,
- 0,0,0,NULL,0
- };
-
- PROPINFO PropParaStyle = {
- "ParaStyle",
- DT_LONG|PF_fGetMsg|PF_fSetMsg|PF_fNoShow|PF_fNoRuntimeR,
- 0,0,0,NULL,0
- };
-
- PROPINFO PropParaIndentLeft = {
- "ParaIndentLeft",
- DT_LONG|PF_fGetMsg|PF_fSetMsg|PF_fNoShow|PF_fNoRuntimeR,
- 0,0,0,NULL,0
- };
-
- PROPINFO PropParaIndentRight = {
- "ParaIndentRight",
- DT_LONG|PF_fGetMsg|PF_fSetMsg|PF_fNoShow|PF_fNoRuntimeR,
- 0,0,0,NULL,0
- };
-
- PROPINFO PropParaIndentHanging = {
- "ParaIndentHanging",
- DT_LONG|PF_fGetMsg|PF_fSetMsg|PF_fNoShow|PF_fNoRuntimeR,
- 0,0,0,NULL,0
- };
-
- PROPINFO PropSaveFormat = {
- "SaveFormat",
- DT_LONG|PF_fGetMsg|PF_fSetMsg|PF_fNoShow|PF_fNoRuntimeR,
- 0,0,0,NULL,0
- };
-
- PROPINFO PropCommand = {
- "Command",
- DT_LONG|PF_fGetMsg|PF_fSetMsg|PF_fNoShow|PF_fNoRuntimeR,
- 0,0,0,NULL,0
- };
-
- PROPINFO PropReadFile = {
- "ReadFile",
- DT_HLSTR|PF_fGetMsg|PF_fSetMsg|PF_fNoShow|PF_fNoRuntimeR,
- 0,0,0,NULL,0
- };
-
- PROPINFO PropSaveFile = {
- "SaveFile",
- DT_HLSTR|PF_fGetMsg|PF_fSetMsg|PF_fNoShow|PF_fNoRuntimeR,
- 0,0,0,NULL,0
- };
-
- /*******************************************************************************
- Property Table
- ********************************************************************************/
- PPROPINFO TvbProp[] =
- {
- PPROPINFO_STD_CTLNAME,
- PPROPINFO_STD_LEFT,
- PPROPINFO_STD_TOP,
- PPROPINFO_STD_WIDTH,
- PPROPINFO_STD_HEIGHT,
- PPROPINFO_STD_VISIBLE,
- PPROPINFO_STD_HWND,
-
- (PPROPINFO) &PropWordWrap,
- (PPROPINFO) &PropVScroll,
- (PPROPINFO) &PropHScroll,
- (PPROPINFO) &PropPrintView,
- (PPROPINFO) &PropShowStatus,
- (PPROPINFO) &PropShowRuler,
- (PPROPINFO) &PropBorderMargin,
- (PPROPINFO) &PropOutputRtf,
- (PPROPINFO) &PropReadOnly,
- (PPROPINFO) &PropPageMode,
- (PPROPINFO) &PropShowToolBar,
-
- (PPROPINFO) &PropData,
- (PPROPINFO) &PropRepaint,
- (PPROPINFO) &PropSetCharStyle,
- (PPROPINFO) &PropResetCharStyle,
- (PPROPINFO) &PropParaReset,
- (PPROPINFO) &PropParaStyle,
- (PPROPINFO) &PropParaIndentLeft,
- (PPROPINFO) &PropParaIndentRight,
- (PPROPINFO) &PropParaIndentHanging,
-
- (PPROPINFO) &PropSaveFormat,
- (PPROPINFO) &PropCommand,
-
- (PPROPINFO) &PropReadFile,
- (PPROPINFO) &PropSaveFile,
-
- NULL
- };
-
- /*******************************************************************************
- Custom events
- ********************************************************************************/
-
- WORD ParamHypertext[] = {ET_HLSTR, ET_HLSTR};
- EVENTINFO EventHypertext = {
- "Hypertext",
- 2,
- 4,
- ParamHypertext,
- "HText as String, HCode as String"
- };
-
- WORD ParamKeyDown[] = {ET_I2};
- EVENTINFO EventKeyDown = {
- "KeyDown",
- 1,
- 2,
- ParamKeyDown,
- "KeyCode as Integer"
- };
-
- WORD ParamKeyUp[] = {ET_I2};
- EVENTINFO EventKeyUp = {
- "KeyUp",
- 1,
- 2,
- ParamKeyUp,
- "KeyCode as Integer"
- };
-
- WORD ParamKeyPress[] = {ET_I2};
- EVENTINFO EventKeyPress = {
- "KeyPress",
- 1,
- 2,
- ParamKeyPress,
- "KeyCode as Integer"
- };
-
- /*******************************************************************************
- Event Table
- ********************************************************************************/
- PEVENTINFO TvbEvent[] =
- {
- PEVENTINFO_STD_CLICK,
- PEVENTINFO_STD_DBLCLICK,
- PEVENTINFO_STD_GOTFOCUS,
- PEVENTINFO_STD_LOSTFOCUS,
- (PEVENTINFO) &EventHypertext,
- (PEVENTINFO) &EventKeyDown,
- (PEVENTINFO) &EventKeyUp,
- (PEVENTINFO) &EventKeyPress,
- NULL
- };
-
- /*******************************************************************************
- Function Prototypes
- ********************************************************************************/
- #include "tvb_prot.h"
-