HQ.H
上传用户:bjghjy
上传日期:2007-01-07
资源大小:379k
文件大小:6k
- //#define WM_UDP_HQ WM_USER+1
- //#define WM_UDP_JY WM_USER+2
- #define HQ_REFRESH_TIME 10
- #define MAX_HQ_SENDCOUNT 25
- #define MAX_ZQXX_SENDCOUNT 10
- #define MAX_GRAPH_SENDCOUNT 20
- #define HQ_FLDS_COUNT 14+1
- #define HQ_REFRESH_FLDS_COUNT 9
- #define MAX_HQFLDS_COUNT 15
- #define MAX_HQSEL_COUNT 5
- #define MAX_HQSEL_REC_COUNT 100
- #define MAX_HQ_REC_COUNT 600
- #define MAX_GRA_REC_COUNT 500
- #define MAX_ZS_COUNT 15
- #define MAX_ZQDM_SIZE 7
- #define MAX_ZQMC_SIZE 13
- #define MAX_JG_SIZE 7
- #define MAX_CJSS_SIZE 7
- #define MAX_SL_SIZE 9
- #define MAX_CJJE_SIZE 10
-
- #define MAX_CJZJE_SIZE 18
- #define MAX_FLD_SIZE MAX_CJZJE_SIZE
- #define MAX_ZS_NAME_SIZE 15
- #define MAX_ZS_SIZE 12
- #define MAX_FILE_NAME_SIZE 13
- #define ERROR_HEAD (LPSTR)"ERROR"
- #define NOTRUN_HEAD (LPSTR)"NOTRUN"
- #define HQ00_HEAD (LPSTR)"HQ00"
- #define HQ01_HEAD (LPSTR)"HQ01"
- #define DP_HEAD (LPSTR)"DP"
- #define MMP_HEAD (LPSTR)"MMP"
- #define HQ10_HEAD (LPSTR)"HQ10"
- #define GRA00_HEAD (LPSTR)"GRA00"
- #define GRA01_HEAD (LPSTR)"GRA01"
- #define GRA10_HEAD (LPSTR)"GRA10"
- #define MAXMIN10_HEAD (LPSTR)"MAXMIN10"
- #define ZX_HEAD (LPSTR)"ZX"
- #define MSG_HEAD (LPSTR)"MSG"
- #define CLNT_EXIT (LPSTR)"CEXIT"
- #define CLNT_ALIVE (LPSTR)"ALIVE"
- #define JY_EXIT (LPSTR)"JYEXIT"
- #define GETZQMC_HEAD (LPSTR)"GETZQMC"
- #define DATA_DAY_HEAD (LPSTR)"DATADAY"
- #define HQ_CHKUSR_HEAD (LPSTR)"CHKUSR"
- #define RECV_FILE_HEAD (LPSTR)"RECVFILE"
- typedef struct tag_RECV_FILE_FRAME
- {
- char filename[12];
- char sign; // bit4 is file begin sign ,bit3 is file EOF sign,
- int filelen; // bit2 is file compress sign
- }RECV_FILE_FRAME;
-
- #define STOCK_INFO_HEAD (LPSTR)"STOCKINFO"
- #define FILE_STOCK_INFO 0 //个股信息
- #define FILE_LIST_DIR 1 //新闻目录
- #define FILE_NORMAL 2 //单个文件
- #define FILE_SZ_ALL_MINUTE 3 //深分时数据
- #define FILE_SZ_ALL_DAY 4 //深日线数据
- #define FILE_SH_ALL_MINUTE 5 //沪分时数据
- #define FILE_SH_ALL_DAY 6 //沪日线数据
- #define FILE_WINPY 7
- typedef struct tag_STOCK_INFO_FRAME
- {
- int type;
- char name[MAX_FILE_NAME_SIZE];
- }STOCK_INFO_FRAME,FILE_INFO_FRAME;
-
- #define JYS_SZ 0
- #define JYS_SH 1
- #define SSUB_INT 0
- #define SSUB_LONG 1
- #define SSUB_FLOAT 2
- ////////////////////////////
- #define FLD_TYPE_STRING 0
- #define FLD_TYPE_FLOAT 1
- #define FLD_TYPE_LONG 2
- typedef struct tag_HQ_REF_DATA
- {
- float zgjg; //最高 2
- float zdjg; //最低 3
- float zgjm; //叫卖 4
- float zdjm; //叫买 5
- float zjjg; //成交 6
- float zdf; //涨幅 7
- long cjss; //成交手数 8
- long lc; //量差(现手) 9
- long npzl; //内盘总量 10
- float wb; //委比 11
- long cjje; //成交金额 12
- }HQ_REF_DATA, FAR *LPHQ_REF_DATA;
- typedef struct tag_HQ_PRE_DATA
- {
- char zqmc[MAX_ZQMC_SIZE]; //名称
- char zqdm[MAX_ZQDM_SIZE]; //代码
- float zrsp; //昨收盘 0
- float jrkp; //今开盘 1
- }HQ_PRE_DATA, FAR *LPHQ_PRE_DATA;
- typedef struct tag_HQ_DATA
- {
- int jys;
- int recCount;
- LPHQ_PRE_DATA lpPreData;
- LPHQ_REF_DATA lpRefData;
- BOOL *isJgChanged, *isLcChanged;
- BOOL *isReadOK;
- }HQ_DATA, FAR *LPHQ_DATA;
- typedef struct tag_HQ_TIME
- {
- int am_min_start, am_min_count, pm_min_start, pm_min_count;
- BOOL fRunning;
- }HQ_TIME, FAR *LPHQ_TIME;
- typedef struct tag_GRAPH_PARA
- {
- int ma[2];
- int gap;
- }GRAPH_PARA, FAR *LPGRAPH_PARA;
- typedef struct tag_GRA_DATA
- {
- int tim;
- float zjjg;
- long lc, zl;
- BYTE BS;
- }GRA_DATA, FAR *LPGRA_DATA;
- typedef struct tag_GRA_HEAD
- {
- int dateNum;
- int minTotal;
- float zgjg, zdjg;
- long zglc, zdlc;
- float zrsp;
- long npzl, wpzl;
- }GRA_HEAD, FAR *LPGRA_HEAD;
- typedef struct tag_GRAPH_DATA
- {
- int jys;
- int recNum;
- GRA_HEAD GraHead;
- GRA_DATA huge *lpGraData;
- short *lpMinPos;
- long *lpMinLc;
- int minEnd, minEndPrev, minCount;
- BOOL fRefreshDraw;
- GRAPH_PARA xlt,jlt;
- COLORREF color[2];
- HFONT hFont;
- }GRAPH_DATA, FAR *LPGRAPH_DATA;
- typedef struct tag_ZS
- {
- char szName[MAX_ZS_NAME_SIZE+1]; //名称
- float szSp; //收盘
- float szKp; //开盘
- float szZg; //最高
- float szZd; //最低
- float szZj; //最近
- float szSd; //升跌
- int isChanged;
- }ZS, FAR *LPZS;
- typedef struct tag_ZS_DATA
- {
- int jys;
- int zsCount;
- LPZS lpZs;
- }ZS_DATA, FAR *LPZS_DATA;
- typedef struct tag_DP_DATA
- {
- int zsCount;
- float zs[15]; //主要指数:深圳成分指数,上海综合指数
- float sp[15];
- float sd[15]; //升跌
- long cjzje; //上海成交总金额
- float npbl; //内盘比例
- long cjss; //成交手数
- int upCount, downCount, equalCount;
- }DP_DATA, FAR *LPDP_DATA;
- typedef struct tag_MMP_DATA
- {
- int jys;
- int recNum;
- float jwBuy[3];
- long slBuy[3];
- float jwSell[3];
- long slSell[3];
- }MMP_DATA, FAR *LPMMP_DATA;
- typedef struct tag_CJ_DATA
- {
- int jys;
- int recNum;
- int recCount;
- int szTime[10];
- float szJg[10];
- long szSl[12];
- }CJ_DATA, FAR *LPCJ_DATA;
- typedef struct tag_HQSEL_DATA
- {
- int jys;
- int recCount;
- int recNum[MAX_HQSEL_REC_COUNT+1];
- }HQSEL_DATA, FAR *LPHQSEL_DATA;
- typedef struct tag_MAXMIN
- {
- float zjjg;
- float zdf;
- long cjss;
- }MAXMIN, FAR *LPMAXMIN;
- #define ZDF 0
- #define ZD 1
- #define CJSS 2
- #define CJJE 3
- typedef struct tag_MAXMIN_DATA
- {
- int recNum[4][10];
- MAXMIN MaxMin[4][10];
- }MAXMIN_DATA, FAR *LPMAXMIN_DATA;
- typedef struct tag_ZX_DATA
- {
- long len;
- LPSTR lpText;
- }ZX_DATA, FAR *LPZX_DATA;
- extern HQ_DATA HqData[2];
- extern HQSEL_DATA HqSelData[MAX_HQSEL_COUNT];
- extern MMP_DATA MmpData;
- extern DP_DATA DpData[2];
- extern CJ_DATA CjData;
- extern HQ_TIME HqTime[2];
- extern GRAPH_DATA GraphData;
- extern MAXMIN_DATA MaxMinData[2][2]; //jys, 0:max, 1:min
- extern ZX_DATA ZxData;
- typedef struct tag_HQ_REF_DATA_V202
- {
- char zqmc[MAX_ZQMC_SIZE]; //名称
- char zqdm[MAX_ZQDM_SIZE]; //代码
- long zrsp; //昨收盘
- long jrkp; //今开盘
- long zgjg; //最高
- long zdjg; //最低
- long zgjm; //叫卖
- long zdjm; //叫买
- long zjjg; //成交
- long cjss; //成交手数
- long npzl; //内盘总量
- long cjje; //成交金额
- long wb;
- }HQ_REF_DATA_V202;