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

📄 demodlg.h

📁 中国移动短信平台开发接口库
💻 H
字号:
// demoDlg.h : header file
//

#if !defined(AFX_DEMODLG_H__5EE53E47_6F04_11D2_8D15_00C0DF22708D__INCLUDED_)
#define AFX_DEMODLG_H__5EE53E47_6F04_11D2_8D15_00C0DF22708D__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CDemoDlg dialog

#define WM_ADDDLVSMNUM	WM_USER+100

//by ycl 2001.9.26 CMPP
#define MAX_SPID_LEN           6
#define MAX_SERVICCE_LEN       10
#define MAX_MSG_ID             8
#define MAX_FEE_TYPE_LEN       2
#define MAX_FEE_CODE_LEN       6
#define MAX_ADDRS_LEN      21*100
#define MAX_ADDR_LEN       (20+1)
#define MAX_SUBMIT_TIME_LEN    10
#define MAX_DONE_TIME_LEN      10
#define MAX_STATE_LEN          7
#define MAX_FEEVALUE_LEN       6
#define MAX_RESERVE_LEN       8
//end by ycl

// 陈兴鹏
#define	MAX_TIMESTAMP_LEN	50
#define MAX_UD_LEN			300
#define MAX_SERVICE			300



#define SGIP_DELIVER	          0x00000004
#define SGIP_REPORT	              0x00000005
#define SGIP_USERRPT	          0x00000011

#define UC unsigned char

#define DEFAULT_REGKEY  ".Default\\Software\\zg\\smeidemo\\IPAddress"
class CDemoDlg : public CDialog
{
// Construction

//by ycl 2001.9.26
public:	
	unsigned char m_byPKTotal;                   //相同Msg_id的消息总条数,从1开始
    unsigned char m_byPKNumber;                    //相同Msg_id的消息序号,从1开始
	unsigned char m_byMsgLevel;                    //信息级别
	unsigned char m_byFeeUserType;                 //计费用户类型字段,0:对目的终端MSISDN计费;1:对源终端MSISDN计费;2:对SP计费;3:表示本字段无效
	char m_sFeeAddr[MAX_ADDR_LEN];                            //被计费用户地址
	char m_sSPID[MAX_SPID_LEN];                        //信息内容来源
	char m_sFeeType[MAX_FEE_TYPE_LEN];                 //资费类别
	char m_sFeeCode[MAX_FEE_CODE_LEN];                 //资费代码
	unsigned char m_byUsrNum;                     //接收消息的用户数量
	char m_sDestAddrs[MAX_ADDRS_LEN]; 
//end by ycl

//by ycl 2001.12.8
	unsigned long  m_nMTTLMsg;
    unsigned long  m_nMTTLusr;
    unsigned long  m_nMTScs;
    unsigned long  m_nMTWT;
    unsigned long  m_nMTFL;
    unsigned long  m_nMOScs;
    unsigned long  m_nMOWT;
    unsigned long  m_nMOFL;
//

public:

	CRITICAL_SECTION m_critical;

	CDemoDlg(CWnd* pParent = NULL);	// standard constructor
	~CDemoDlg();
	static DWORD WINAPI LoginThread(LPVOID lparam);
	static DWORD WINAPI LogoutThread(LPVOID lparam);
	static DWORD WINAPI SubmitThread(LPVOID lparam);	


// Dialog Data
	//{{AFX_DATA(CDemoDlg)
	enum { IDD = IDD_DEMO_DIALOG };
	CListBox	m_smidlist;
	int		m_PRI;
	CString	m_system_id;
	CString	m_password;
	CString	m_userdata;
	int		m_default_id;
	DWORD	m_sm_id;
	UINT	m_fcs;
	CString	m_orgaddr;
	CString	m_destaddr;
	CString	m_schedule;
	CString	m_expire;
	CString	m_final;
	CString	m_status;
	CString	m_error_code;
	CString	m_subname;
	CString	m_subaddr;
	CString	m_subpassword;
	CString	m_subid;
	DWORD	m_ocos;
	DWORD	m_tcos;
	UINT	m_replaynum;
	int		m_dir;
	CString	m_begintime;
	CString	m_finaltime;
	UINT	m_smnum;
	UINT	m_len;
	int		m_protocol;
	CString	m_ip;
	BOOL	m_bAutoAck;
	CString	m_DlvSMNum;
	UINT	m_pid;
	CString	m_RegTime;
	CString	m_mstype;
	CString	m_Service;
	CString	m_bSM;
	CString	m_TON;
	CString	m_NPI;
	CString	m_DCS;
	DWORD	m_port;
	UINT	m_UDHI;
	BOOL	m_Binary;
	int		m_iSRR;
	CString	m_sServiceType;
	CString	m_sMsgID;
	BOOL	m_bSmNumFlag;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDemoDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	afx_msg void OnContextMenu(CWnd*, CPoint point);
	HICON m_hIcon;
	//ULONG Dlv_SMID;
	//BOOL wait_for_ack;
	BOOL bIsExit;
	HANDLE m_hThread;
	HANDLE m_hWaitEvent;

	static DWORD WINAPI DSMThread(LPVOID lparam);

    virtual void OnCancel();
    BOOL IsExitDemo();

	void LoadRegKey();
	void SaveRegKey();
	
	// Generated message map functions
	//{{AFX_MSG(CDemoDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnClose();
	afx_msg void OnLogin();
	afx_msg void OnLogout();
	afx_msg void OnSubmitSM();
	virtual void OnOK();
	afx_msg void OnQuerySMDetails();
	afx_msg void OnCancelSM();
	afx_msg void OnReplaceSM();
	afx_msg void OnQueryStatus();
	afx_msg void OnAddSub();
	afx_msg void OnDelSub();
	afx_msg void OnModSub();
	afx_msg void OnQuerySub();
	afx_msg void OnQueryMsgs();
	afx_msg void OnDblclkList1();
	afx_msg void OnInitialInterface();
	afx_msg void OnGetDeliverSM();
	afx_msg void OnAutoAck();
	afx_msg void OnDlvSMNum(WPARAM wParam , LPARAM lParam );
	afx_msg void OnKillfocusEdit3();
	afx_msg void Onvpsubmit();
	afx_msg void OnLogoutR();
	afx_msg void OnQueryDetailEx();
	afx_msg void OnReplaceSMEx();
	afx_msg void OnExitInterface();	
	afx_msg void OnLoadCmppConfig();
	afx_msg void OnCmppSubmitSM();
	afx_msg void OnCmppQuery();
	afx_msg void OnCmppCancel();
	afx_msg void OnClear();
	afx_msg void OnChecksmnum();
	afx_msg void OnMENUITEMAbout();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

    // 2002.01.31 hyt add
private:
    unsigned long m_ulSmNum; //接收的短消息数
    // end add

    // 2002-09-09 hyt add for sgip
    // 增加sgip参数
public:
    char m_sGivenValue[MAX_FEEVALUE_LEN];
	UC m_byAgentFlag;
	UC m_byMoreMTFlag;
	UC m_byMsgType;
    char m_sReserve[MAX_RESERVE_LEN];
    // end 2002-09-09
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.


#endif // !defined(AFX_DEMODLG_H__5EE53E47_6F04_11D2_8D15_00C0DF22708D__INCLUDED_)

⌨️ 快捷键说明

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