⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wizard.h

📁 组态王图库开发包
💻 H
📖 第 1 页 / 共 2 页
字号:
// Wizard.h : main header file for the WIZARD DLL
//

#if !defined(AFX_WIZARD_H__4A9C7483_8340_11D4_BB7A_0080C8DC7099__INCLUDED_)
#define AFX_WIZARD_H__4A9C7483_8340_11D4_BB7A_0080C8DC7099__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

//#include "resource.h"		// main symbols

#define WM_WIZARD_SCRIPT     WM_USER + 2000    // 执行Draw或Link命令
#define WM_WIZARD_NEWTAG     WM_USER + 2001    // 为报警精灵和历史库精灵生成Tag
#define WM_CHECK_TAG         WM_USER + 2010    // 校验变量

#define DYNAMOS_VERSION1     1
#define DYNAMOS_VERSION2     2

// 绘制精灵时
#define WIZARD_CREATE2       1   // 表示绘制动作发生在创建精灵时
#define WIZARD_EDIT2         2   // 表示绘制动作发生在用户要新设置精灵属性
#define WIZARD_RESIZE2       3   // 表示绘制动作发生在调整精灵大小后

typedef  int (WINAPI * Func_WizardGetVersion) ();
typedef  int (WINAPI * Func_WizardGetCount) ();
typedef  int (WINAPI * Func_WizardGetStructSize) (int wizardIndex);
typedef  void (WINAPI * Func_WizardGetParam)(void** ppParams,char* pResult);

//version  1
typedef  BOOL (WINAPI * Func_WizardCreate) (int wizardIndex,float fact,void* pConfig);
typedef  BOOL (WINAPI * Func_WizardEdit) (int wizardIndex,float fact,void* pConfig);
typedef  BOOL (WINAPI * Func_WizardResize) (int wizardIndex,float fact,void* pConfig);
//version  2
//  允许比例绘制,自由绘制
typedef  BOOL (WINAPI * Func_WizardCreate2) (int wizardIndex,float fact,float x_fact,float y_fact,void* pConfig);
typedef  BOOL (WINAPI * Func_WizardEdit2) (int wizardIndex,float fact,float x_fact,float y_fact,void* pConfig);
typedef  BOOL (WINAPI * Func_WizardResize2) (int wizardIndex,float fact,float x_fact,float y_fact,void* pConfig);


#define WIZARD_SIZE         64         //默认精灵尺寸

#define WIZARD_ALMWIN       0
#define WIZARD_HTREND       1

#define HTREND_TAG_SUCC        1    //建立历史趋势曲线变量成功
#define HTREND_DICT_FULL      -1    //建立失败:数据库变量已满
#define HTREND_SAVE_FAIL      -2    //建立失败:数据库存盘失败           

#define  SHIFT_BIT  0x100
#define  CTRL_BIT   0x200

#define  LABEL_RIGHT  0       //输出时右对齐
#define  LABEL_LEFT   1       //输出时左对齐
#define  LABEL_MID    2       //输出时中对齐

#define REAL_CURVE_NUM       4  //实时趋势曲线数目
#define HIST_CURVE_NUM       8  //历史趋势曲线数目

//描述语句类型定义
#define USE_TAGNAME          0x00
#define USE_PROGRAM          0x01
#define NEW_TAG              0x02

#define DRAW_LINE            0x05        //画线类型
#define DRAW_ROUNDRECT       0x06
#define DRAW_ELLIPSE         0x07
#define DRAW_POLYSHAPE       0x08
#define DRAW_PIE             0x09
#define DRAW_PIPE            0x0a
#define DRAW_LABEL           0x0b
#define DRAW_MYBUTTON        0x0c
#define DRAW_BITMAP          0x0d
#define DRAW_ALARMWIN        0x0e
#define DRAW_RTREND          0x10
#define DRAW_HTREND          0x11

#define LINK_PEN             0x12
#define LINK_BRUSH           0x13
#define LINK_TEXTCOLOR       0x14
#define LINK_FILL            0x15
#define LINK_SIZE            0x16
#define LINK_ROTATE          0x17
#define LINK_HORSHIFT        0x18
#define LINK_VERSHIFT        0x19
#define LINK_ANALOGOUT       0x1a
#define LINK_DISCOUT         0x1b
#define LINK_TEXTOUT         0x1c
#define LINK_ANALOGIN        0x1d
#define LINK_DISCIN          0x1e
#define LINK_TEXTIN          0x20
#define LINK_BLINK           0x21
#define LINK_HIDE            0x22
#define LINK_HORSHIFTIN      0x23
#define LINK_VERSHIFTIN      0x24
#define LINK_ACTION          0x25

#define NO_SECTION           1           //不受安全区保护
#define NO_HOTKEY            0           // 无快捷键 add by wlc 2001.1.15
#define NO_PRIVATE           0           // 缺省权限 add by wlc 2001.1.15

// 数据类型	
#define  MEM_DISC    0x0001
#define  MEM_ANALOG  0x0002
#define  MEM_STR     0x0004
#define  DDE_DISC    0x0008          
#define  DDE_ANALOG  0x0010
#define  DDE_STR     0x0020
#define  HIS_TREND   0x0040
#define  ALM_WIN     0x0080   
#define  MEM_LONG    0x0100
#define  DDE_LONG    0x0200
#define  SHOW_ALL    0

// 校验类型
#define  EV_STRING  1
#define  EV_ANALOG  2
#define  EV_DISC    4  
#define  EV_LONG    8

//-------------------------------DRAW-----------------------------------

typedef struct 
{
    int x1;
	int y1;
	int x2;
	int y2;
	COLORREF brushColor;
	WORD brushStyle;
	short brushHatch;

	int      fillStyle;       //过渡色填充类型 : 0:None;1:VerFill;2:HorFill...
	COLORREF fromColor;
	COLORREF toColor;

	COLORREF penColor;
	int penStyle;
	int penWidth;
}DRAWRECT,*LPDRAWRECT;         //for CLine,CEllipse,CRoundRect,


typedef struct
{
    int x1;
	int y1;
	int x2;
	int y2;
	COLORREF brushColor;
	WORD brushStyle;
	short brushHatch;

	COLORREF penColor;
	int penStyle;
	int penWidth;

	char* pText;

    BYTE textPenFontStyle;      
    int textPenFontHeight;      
    int textPenFontWidth;       
    int textPenFontIndex;       
    COLORREF textPenColor;  
}DRAWLABEL,*LPDRAWLABEL;       //for CLabel;

typedef struct
{
    BYTE textPenFontStyle;      
    int textPenFontHeight;      
    int textPenFontWidth;       
    int textPenFontIndex;      
	char* pLabel;
}LABELMETRIC,*LPLABELMETRIC; //用来获得字母的宽度和高度

typedef struct
{
    int x1;
	int y1;
	int x2;
	int y2;
	COLORREF brushColor;
	WORD brushStyle;
	short brushHatch;
	int      fillStyle;       //过渡色填充类型 : 0:None;1:VerFill;2:HorFill...
	COLORREF fromColor;
	COLORREF toColor;
	COLORREF penColor;
	int penStyle;
	int penWidth;
    
	long startPtX;
	long startPtY;
	long endPtX;
	long endPtY;
}DRAWPIE,*LPDRAWPIE;       //for CPie;
	
typedef struct
{
    int x1;
	int y1;
	int x2;
	int y2;
	COLORREF brushColor;
	WORD brushStyle;
	short brushHatch;

	COLORREF penColor;
	int penStyle;
	int penWidth;
    
    BOOL  bPress;   // whether button is pressed.
    char*  pText;   // text label the button.
    BOOL  bGray;    //是否变灰

}DRAWMYBUTTON,*LPDRAWMYBUTTON;       //for CMyButton;

typedef struct 
{
    int x1;
	int y1;
	int x2;
	int y2;
	COLORREF brushColor;
	WORD brushStyle;
	short brushHatch;

	int      fillStyle;       //过渡色填充类型 : 0:None;1:VerFill;2:HorFill...
	COLORREF fromColor;
	COLORREF toColor;

	COLORREF penColor;
	int penStyle;
	int penWidth;

	int     nSize;
    POINT*  pArray;
}DRAWPOLYSHAPE,*LPDRAWPOLYSHAPE;           //for CPolyShape

typedef struct 
{
    int x1;
	int y1;
	int x2;
	int y2;
	COLORREF brushColor;
	WORD brushStyle;
	short brushHatch;
	COLORREF penColor;
	int penStyle;
	int penWidth;
    
	int    nSize;
    POINT* pArray;
	short  pipeWidth;
}DRAWPIPE,*LPDRAWPIPE;           //for CPipe

typedef struct 
{
    int x1;
	int y1;
	int x2;
	int y2;
	COLORREF brushColor;
	WORD brushStyle;
	short brushHatch;

	COLORREF penColor;
	int penStyle;
	int penWidth;

//	int nameID;
	char* pName;
}DRAWBITMAP,*LPDRAWBITMAP;         //for CRealBitmap

typedef struct 
{
    int x1;
	int y1;
	int x2;
	int y2;
	COLORREF brushColor;
	WORD brushStyle;
	short brushHatch;

	COLORREF penColor;
	int penStyle;
	int penWidth;
}DRAWALARMWIN,LPDRAWALARMWIN;  //for CAlarmWin     

struct Trend_Curve
{                                  
    LOGPEN   pen;       // used to draw curve line.
    char*    Links;     // used to link to database.
};    

typedef struct 
{
    int x1;
	int y1;
	int x2;
	int y2;
	COLORREF brushColor;
	WORD brushStyle;
	short brushHatch;

	COLORREF penColor;
	int penStyle;
	int penWidth;
    //--==-=-zz add 2001/1/18=-=-=-=-=--=-=-=-==-=-=-=-===-
    RECT inrect;               //the size of ccoordinate system

    COLORREF borderPenColor;        // 边框笔色
    COLORREF borderBrushColor;      // 坐标区域背景色

    BYTE     bIsDrawAxis   ;   // whether draw x and y axis

    LOGPEN   xAndyaxis;   // used to draw x and y axis
    LOGPEN   lMajDiPenX;  // used to draw major x line
    LOGPEN   lMajDiPenY;  // used to draw major  y line;
    LOGPEN   lMinDiPenX;  // used to draw mine x line;
    LOGPEN   lMinDiPenY;  // used to draw mine y line
    
    BYTE     byValueNumY;   //the number of signature in y axis 
    BYTE     byValueNumX;    // the number of (x) axis'signature 

    POINT    MajDivision;  //describe how to devide coordinate area
    POINT    MinDivision; 
    
    BYTE     byIsShortDivLine; // whether draw short lines on axis or not

    LOGFONT  logfont[2];
    COLORREF fontcolor[2];

    BYTE     bIsNeedYLabel;

    BYTE     nWholeNum;// integer digital counts
    BYTE     nDigitNum;// 
    BYTE     bIsScience ;
    float    dValueStart;  // the start point value of y axis     
    float    dValueSize;   // the lenth of y axis                 
  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -