亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dialtestdlg.cpp

?? GPRS撥號包括CMNET,CMWAP ,用程序實現WAP訪問.
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
// DialTestDlg.cpp : implementation file
//

#include "stdafx.h"
#include "DialTest.h"
#include "ClientSocket.h"
#include "DialTestDlg.h"
#include "MsgCtrl.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About

class CAboutDlg : public CDialog
{
public:
	CAboutDlg();

// Dialog Data
	//{{AFX_DATA(CAboutDlg)
	enum { IDD = IDD_ABOUTBOX };
	//}}AFX_DATA

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

// Implementation
protected:
	//{{AFX_MSG(CAboutDlg)
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
	//{{AFX_DATA_INIT(CAboutDlg)
	//}}AFX_DATA_INIT
}

void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CAboutDlg)
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
	//{{AFX_MSG_MAP(CAboutDlg)
		// No message handlers
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDialTestDlg dialog

CDialTestDlg::CDialTestDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CDialTestDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDialTestDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
	m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
	m_hRasConn = NULL;
	m_pSocket = new CClientSocket(this);
//	m_pSocket = new CSocket();
//	m_strRasLocalIp  =  "10.214.128.144";
	m_nOrderStep = 0;
}

CDialTestDlg::~CDialTestDlg()
{
	if (m_hRasConn)
	{
		RasHangUp(m_hRasConn);
		m_hRasConn = NULL;
	}
	if (m_pSocket)
	{
		m_pSocket->Close();
		delete m_pSocket;
		m_pSocket = NULL;
	}

}

void CDialTestDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDialTestDlg)
	DDX_Control(pDX, IDC_EDIT_RECEIVE, m_editReceive);
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CDialTestDlg, CDialog)
	//{{AFX_MSG_MAP(CDialTestDlg)
	ON_WM_SYSCOMMAND()
	ON_WM_PAINT()
	ON_WM_QUERYDRAGICON()
	ON_BN_CLICKED(IDC_BUTTON_SEND_SMS, OnButtonSendSms)
	ON_BN_CLICKED(IDC_BUTTON_OPEN_COMM, OnButtonOpenComm)
	ON_BN_CLICKED(IDC_BUTTON_CLOSE_COMM, OnButtonCloseComm)
	ON_BN_CLICKED(IDC_BUTTON_GET_IMSI, OnButtonGetImsi)
	ON_BN_CLICKED(IDC_BUTTON_GET_IMEI, OnButtonGetImei)
	ON_BN_CLICKED(IDC_BUTTON_GET_CARDID, OnButtonGetCardid)
	ON_BN_CLICKED(IDC_BUTTON_SET_CMNET, OnButtonSetCmnet)
	ON_BN_CLICKED(IDC_BUTTON_SET_CMWAP, OnButtonSetCmwap)
	ON_BN_CLICKED(IDC_BUTTON_DIALUP, OnButtonDialup)
	ON_BN_CLICKED(IDC_BUTTON_HANGUP, OnButtonHangup)
	ON_BN_CLICKED(IDC_BUTTON_CLEAR, OnButtonClear)
	ON_BN_CLICKED(IDC_BUTTON_CONNECT_TEST, OnButtonConnectTest)
	ON_BN_CLICKED(IDC_BUTTON_GETURL, OnButtonGeturl)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDialTestDlg message handlers

BOOL CDialTestDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	// Add "About..." menu item to system menu.

	// IDM_ABOUTBOX must be in the system command range.
	ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
	ASSERT(IDM_ABOUTBOX < 0xF000);

	CMenu* pSysMenu = GetSystemMenu(FALSE);
	if (pSysMenu != NULL)
	{
		CString strAboutMenu;
		strAboutMenu.LoadString(IDS_ABOUTBOX);
		if (!strAboutMenu.IsEmpty())
		{
			pSysMenu->AppendMenu(MF_SEPARATOR);
			pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
		}
	}

	// Set the icon for this dialog.  The framework does this automatically
	//  when the application's main window is not a dialog
	SetIcon(m_hIcon, TRUE);			// Set big icon
	SetIcon(m_hIcon, FALSE);		// Set small icon
	
	// TODO: Add extra initialization here
	
	return TRUE;  // return TRUE  unless you set the focus to a control
}

void CDialTestDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
	if ((nID & 0xFFF0) == IDM_ABOUTBOX)
	{
		CAboutDlg dlgAbout;
		dlgAbout.DoModal();
	}
	else
	{
		CDialog::OnSysCommand(nID, lParam);
	}
}

// If you add a minimize button to your dialog, you will need the code below
//  to draw the icon.  For MFC applications using the document/view model,
//  this is automatically done for you by the framework.

void CDialTestDlg::OnPaint() 
{
	if (IsIconic())
	{
		CPaintDC dc(this); // device context for painting

		SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

		// Center icon in client rectangle
		int cxIcon = GetSystemMetrics(SM_CXICON);
		int cyIcon = GetSystemMetrics(SM_CYICON);
		CRect rect;
		GetClientRect(&rect);
		int x = (rect.Width() - cxIcon + 1) / 2;
		int y = (rect.Height() - cyIcon + 1) / 2;

		// Draw the icon
		dc.DrawIcon(x, y, m_hIcon);
	}
	else
	{
		CDialog::OnPaint();
	}
}

// The system calls this to obtain the cursor to display while the user drags
//  the minimized window.
HCURSOR CDialTestDlg::OnQueryDragIcon()
{
	return (HCURSOR) m_hIcon;
}

void CDialTestDlg::OnButtonSendSms() 
{
	// TODO: Add your control notification handler code here
	if (!m_MsgCtrl.SendMsg("Test測試", "13570128606"))
	{
		MessageBox("發送短信失敗!");
	}

}

void CDialTestDlg::OnButtonOpenComm() 
{
	// TODO: Add your control notification handler code here
	if (!m_MsgCtrl.OpenCom("COM5"))
	{
		MessageBox("打開COM5失敗!");
	}
}

void CDialTestDlg::OnButtonCloseComm() 
{
	// TODO: Add your control notification handler code here
	m_MsgCtrl.CloseCom();
}

void CDialTestDlg::OnButtonGetImsi() 
{
	// TODO: Add your control notification handler code here
	SetDlgItemText(IDC_EDIT_IMSI, "");
	CString strImsi;
	if (!m_MsgCtrl.SendAndGetReturn("AT+CIMI\r", strImsi, TRUE))
	{
		MessageBox("取IMSI失敗!");
		return;
	}
	SetDlgItemText(IDC_EDIT_IMSI, strImsi);

	
}

void CDialTestDlg::OnButtonGetImei() 
{
	// TODO: Add your control notification handler code here
	SetDlgItemText(IDC_EDIT_IMEI, "");
	CString strImei;
	if (!m_MsgCtrl.SendAndGetReturn("AT+CGSN\r", strImei, TRUE))
	{
		MessageBox("取IMEI失敗!");
		return;
	}
	SetDlgItemText(IDC_EDIT_IMEI, strImei);	
}

void CDialTestDlg::OnButtonGetCardid() 
{
	// TODO: Add your control notification handler code here
	SetDlgItemText(IDC_EDIT_CARDID, "");
	CString strCardID;
	if (!m_MsgCtrl.SendAndGetReturn("AT+CCID\r", strCardID, TRUE))
	{
		MessageBox("取CardID失敗!");
		return;
	}
	int nPos = strCardID.Find(" ");
	if (nPos > 0)
	{
		strCardID = strCardID.Mid(nPos);
	}
	strCardID.TrimLeft(" \"");
	strCardID.TrimRight(" \"");

	SetDlgItemText(IDC_EDIT_CARDID, strCardID);		
}

void CDialTestDlg::OnButtonSetCmnet() 
{
	// TODO: Add your control notification handler code here
	CString strError;

	if (!m_MsgCtrl.SetGPRSNet("CMNET", strError))
	{
		MessageBox(strError);
	}
}

void CDialTestDlg::OnButtonSetCmwap() 
{
	// TODO: Add your control notification handler code here
	CString strError;

	if (!m_MsgCtrl.SetGPRSNet("CMWAP", strError))
	{
		MessageBox(strError);
	}
	
}

void   WINAPI   RasDialFunc(UINT   unMsg,   RASCONNSTATE   rasconnstate,   DWORD   dwError)
{
	char   szRasString[256];   //   Buffer   for   storing   the   error   string
	
	CString strMsg;
	if  (dwError)     //   Error   occurred
	{
		RasGetErrorString((UINT)dwError,   szRasString,   256);
		strMsg.Format("Error:   %d   -   %s\n",dwError,   szRasString);
//		AfxMessageBox(strMsg);
//		SetEvent(g_TerminalEvent);
		return;
	}
	
	//   Map   each   of   the   states   of   RasDial()   and   display   on   the   screen
	//   the   next   state   that   RasDial()   is   entering
	switch   (rasconnstate)
	{
		//   Running   States
	case   RASCS_OpenPort:
		strMsg.Format("Opening  port...\n");
		break;
	case   RASCS_PortOpened:
		strMsg.Format("Port   opened.\n");
		break;
	case   RASCS_ConnectDevice:   
		strMsg.Format("Connecting   device...\n");
		break;
	case   RASCS_DeviceConnected:   
		strMsg.Format("Device   connected.\n");
		break;
	case   RASCS_AllDevicesConnected:
		strMsg.Format("All   devices   connected.\n");
		break;
	case   RASCS_Authenticate:   
		strMsg.Format("Authenticating...\n");
		break;
	case   RASCS_AuthNotify:
		strMsg.Format("Authentication   notify.\n");
		break;
	case   RASCS_AuthRetry:   
		strMsg.Format("Retrying   authentication...\n");
		break;
	case   RASCS_AuthCallback:
		strMsg.Format("Authentication   callback...\n");
		break;
	case   RASCS_AuthChangePassword:   
		strMsg.Format("Change   password...\n");
		break;
	case   RASCS_AuthProject:   
		strMsg.Format("Projection   phase   started...\n");
		break;
	case   RASCS_AuthLinkSpeed:   
		strMsg.Format("Negotiating   speed...\n");
		break;
	case   RASCS_AuthAck:   
		strMsg.Format("Authentication   acknowledge...\n");
		break;
	case   RASCS_ReAuthenticate:   
		strMsg.Format("Retrying   Authentication...\n");
		break;
	case   RASCS_Authenticated:   
		strMsg.Format("Authentication   complete.\n");
		break;
	case   RASCS_PrepareForCallback:   
		strMsg.Format("Preparing   for   callback...\n");
		break;
	case   RASCS_WaitForModemReset:   
		strMsg.Format("Waiting   for   modem   reset...\n");
		break;
	case   RASCS_WaitForCallback:
		strMsg.Format("Waiting   for   callback...\n");
		break;
	case   RASCS_Projected:     
		strMsg.Format("Projection   completed.\n");
		break;
#if   (WINVER   >=   0x400)   
	case   RASCS_StartAuthentication:
		strMsg.Format("Starting   authentication...\n");
		break;
	case   RASCS_CallbackComplete:   
		strMsg.Format("Callback   complete.\n");
		break;
	case   RASCS_LogonNetwork:
		strMsg.Format("Logon   to   the   network.\n");
		break;
#endif   
	case   RASCS_SubEntryConnected:
		strMsg.Format("Subentry   connected.\n");
		break;
	case   RASCS_SubEntryDisconnected:
		strMsg.Format("Subentry   disconnected.\n");
		break;
		
		//   The   RAS   Paused   States   will   not   occur   because
		//   we   did   not   use   the   RASDIALEXTENSIONS   structure
		//   to   set   the   RDEOPT_PausedState   option   flag.
		
		//   The   Paused   States   are:
		
		//   RASCS_RetryAuthentication:
		//   RASCS_CallbackSetByCaller:
		//   RASCS_PasswordExpired:
		
		//   Terminal   States
	case   RASCS_Connected:   

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩亚洲电影在线| 国产成人精品免费网站| 在线免费亚洲电影| 亚洲成人一二三| 欧美日韩国产一区| 热久久免费视频| 精品噜噜噜噜久久久久久久久试看| 国产精品主播直播| 欧美刺激午夜性久久久久久久| 久久精品99久久久| 久久影院电视剧免费观看| 国产精品18久久久久久久久久久久 | 亚洲乱码中文字幕综合| 91免费精品国自产拍在线不卡| 亚洲美女视频在线| 欧美丰满一区二区免费视频| 美女一区二区久久| 国产日韩av一区| 91国偷自产一区二区使用方法| 天天色综合天天| 精品国产乱码久久久久久牛牛| 国产寡妇亲子伦一区二区| 亚洲视频在线观看三级| 欧美日韩国产123区| 久久精品噜噜噜成人88aⅴ| 久久亚洲综合色| 在线看国产日韩| 韩国理伦片一区二区三区在线播放 | 日韩丝袜美女视频| 成人黄色在线网站| 亚洲一区二区不卡免费| 91精品久久久久久久99蜜桃| 韩国三级中文字幕hd久久精品| 中文字幕色av一区二区三区| 欧美日韩综合在线| 国产69精品一区二区亚洲孕妇| 亚洲一区二区三区自拍| 久久久亚洲综合| 欧美自拍偷拍一区| 国产一区视频网站| 亚洲一区二区三区三| 久久青草欧美一区二区三区| 欧美这里有精品| 国产风韵犹存在线视精品| 亚洲观看高清完整版在线观看| 日韩一区二区在线看片| 一本色道综合亚洲| 国产精品一区二区男女羞羞无遮挡| 亚洲在线中文字幕| 午夜一区二区三区在线观看| 久久亚洲精品国产精品紫薇| 欧美日韩一区二区三区不卡| 成人黄色软件下载| 久久99精品久久久久婷婷| 亚洲精品中文在线影院| 国产网红主播福利一区二区| 日韩欧美中文一区二区| 在线精品视频一区二区| 成人久久18免费网站麻豆| 久久99久久99| 日本中文在线一区| 亚洲愉拍自拍另类高清精品| 国产精品久久久久久户外露出| 欧美mv日韩mv亚洲| 欧美裸体一区二区三区| 在线观看日产精品| 91美女在线看| 91亚洲精品乱码久久久久久蜜桃 | 91麻豆国产在线观看| 国产成a人亚洲精品| 韩国成人在线视频| 激情丁香综合五月| 久久激情五月激情| 秋霞国产午夜精品免费视频| 午夜亚洲福利老司机| 亚洲夂夂婷婷色拍ww47| 亚洲亚洲人成综合网络| 亚洲另类春色校园小说| 亚洲人精品一区| 亚洲欧美成aⅴ人在线观看| 欧美激情一区二区三区四区| 久久精品人人做人人综合| 国产三级精品三级| 国产精品三级电影| 中文字幕亚洲精品在线观看| 亚洲欧洲综合另类在线| 亚洲综合激情另类小说区| 一区二区三区在线观看网站| 一二三区精品视频| 亚洲福利一区二区| 日韩av在线播放中文字幕| 性做久久久久久免费观看 | 欧美精品日日鲁夜夜添| 欧美视频中文一区二区三区在线观看| 欧洲视频一区二区| 欧美日韩一区久久| 欧美一区二区视频观看视频| 国产精品灌醉下药二区| 一区在线播放视频| 亚洲一区中文在线| 男人的j进女人的j一区| 国产精品一区三区| aaa欧美日韩| 欧美日韩成人一区二区| 欧美成人猛片aaaaaaa| 国产午夜一区二区三区| 亚洲男女一区二区三区| 天堂久久久久va久久久久| 精品一二三四区| 成人丝袜视频网| 欧美亚洲高清一区二区三区不卡| 91精品国产欧美一区二区成人| 久久久亚洲国产美女国产盗摄 | 国产激情精品久久久第一区二区| 成人h动漫精品一区二| 欧美中文字幕一区二区三区亚洲| 日韩午夜激情电影| 国产精品电影一区二区三区| 五月天久久比比资源色| 国产成人超碰人人澡人人澡| 日本道免费精品一区二区三区| 欧美日韩一区小说| 国产三级三级三级精品8ⅰ区| 一区二区三区日韩精品视频| 久久精品国产精品亚洲红杏 | 久久99久久久久| 99久久精品久久久久久清纯| 欧美一区二区不卡视频| 国产精品久久久久久久第一福利 | 日韩欧美激情四射| 一色屋精品亚洲香蕉网站| 青青草精品视频| 91欧美一区二区| 亚洲精品一区二区三区在线观看| 亚洲精品国产第一综合99久久| 久久国产免费看| 欧美午夜视频网站| 国产精品美女久久久久av爽李琼| 日本免费在线视频不卡一不卡二 | 韩国女主播一区二区三区| 99精品黄色片免费大全| 欧美岛国在线观看| 亚洲电影第三页| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 亚洲成精国产精品女| 成人小视频在线| 日韩三级在线免费观看| 亚洲国产精品天堂| 91在线观看地址| 国产欧美精品一区二区三区四区| 免费在线一区观看| 欧美亚洲综合网| 悠悠色在线精品| 91丨九色丨黑人外教| 国产欧美一区二区精品婷婷 | 一本色道久久综合亚洲91| 国产日韩欧美一区二区三区综合| 日韩avvvv在线播放| 欧美亚洲愉拍一区二区| 一区二区三区在线免费播放| 99久久久国产精品免费蜜臀| 国产欧美精品一区二区三区四区| 九九热在线视频观看这里只有精品| 欧美日韩电影在线播放| 亚洲一二三专区| 欧美亚一区二区| 午夜国产不卡在线观看视频| 欧美在线一二三| 亚洲成人免费在线| 欧美日韩一区高清| 午夜伦欧美伦电影理论片| 欧洲精品在线观看| 午夜视频在线观看一区二区三区 | 国产91丝袜在线播放0| 久久欧美一区二区| 国产成人av一区二区三区在线观看| 亚洲精品一线二线三线| 国产馆精品极品| 成人欧美一区二区三区白人| av电影一区二区| 一区二区视频在线看| 欧美在线免费观看亚洲| 亚洲成av人综合在线观看| 欧美乱熟臀69xxxxxx| 美女国产一区二区三区| 精品欧美一区二区三区精品久久| 久久99精品久久只有精品| 精品日韩一区二区| 国产高清视频一区| 中文字幕一区在线观看| 欧美影视一区在线| 奇米色777欧美一区二区| 337p粉嫩大胆噜噜噜噜噜91av| 国产一区 二区 三区一级| 国产精品久久久久天堂| 欧美在线免费播放| 日韩av中文在线观看| 国产午夜亚洲精品羞羞网站| 日本久久精品电影| 美女网站视频久久|