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

📄 gprsdlg.h

📁 gprs开发使用程序
💻 H
字号:
/*!	\file		GPRSDlg.h
	\brief		应用程序界面声明文件
	\author		陈华毅
	\version	1.0

	用户通过这个窗口实现了与应用程序的交互,通过这个界面控制和使用GPRS模块。
*/

#if !defined(AFX_GPRSDLG_H__801B9198_332F_47B7_9715_D6704657BF95__INCLUDED_)
#define AFX_GPRSDLG_H__801B9198_332F_47B7_9715_D6704657BF95__INCLUDED_

#include "GPRSer.h"	// Added by ClassView
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

/*!	\defgroup GPRSDLG_IMPLEMENT	CGPRSDlg类实现说明
*/
//@{
#define EDIT_NUM_FOCUS 0		//!< 指示光标于号码编辑框内
#define EDIT_MSG_FOCUS 1		//!< 指示光标于消息显示\编辑框内
//@}
//! 主界面对话框类
/*!
	这个类从CDialog派生而来,作为应用程序的主界面。通过调用\ref CICCarder提供的功能,完成用户期望的操作。
*/

//@{
class CGPRSDlg : public CDialog
{
// Construction
public:
	CRITICAL_SECTION m_csSend;		//!< 与发送相关的临界段 
	CRITICAL_SECTION m_csRecv;		//!< 与接收相关的临界段 
	DWORD m_dwThreadID;				//!< 读取串口数据线程ID	 	
	HANDLE m_hRevThread;			//!< 读取串口数据线程句柄 
	INT m_iFocus;					//!< 光标当前状态 

	/*!	显示字符函数
		\param [in] 要显示的字符
		\return	无
	*/
	VOID ShowMsg(CString str);

	/*!	读取串口数据线程函数
		\param [in] pPararm - 长空指针
		\return	无
	*/
	static VOID CommThread(LPVOID pParam);

	/*!	显示字符函数
		\param [in] 要显示的字符'0'-'9','#','*'.
		\return	无
	*/
	VOID ShowText(CString str);
	CGPRSDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CGPRSDlg)
	enum { IDD = IDD_GPRS_DIALOG };
	CString	m_strMsg;
	CString	m_strNum;
	//}}AFX_DATA

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

// Implementation
protected:
	HICON m_hIcon;

	/*!	\fn	virtual BOOL OnInitDialog()
		创建主对话框消息响应函数,在创建过程中初始化GPRS模块
		\param	无
		\return	无
	*/

	/*!	\fn	afx_msg void OnButtonBack()
		清除号码最后一个字符消息响应函数
		\param	无
		\return	无
	*/

	/*!	\fn	afx_msg void OnButtonCall()
		打电话\挂电话消息响应函数
		\param	无
		\return	无
	*/

	/*!	\fn	afx_msg void OnButtonSend()
		发送短消息消息响应函数
		\param	无
		\return	无
	*/

	/*!	\fn	afx_msg void OnButton0()
		按键0消息响应函数
		\param	无
		\return	无
	*/

	/*!	\fn	afx_msg void OnButton1()
		按键1消息响应函数
		\param	无
		\return	无
	*/

	/*!	\fn	afx_msg void OnButton21()
		按键2消息响应函数
		\param	无
		\return	无
	*/

	/*!	\fn	afx_msg void OnButton3()
		按键3消息响应函数
		\param	无
		\return	无
	*/

	/*!	\fn	afx_msg void OnButton4()
		按键4消息响应函数
		\param	无
		\return	无
	*/

	/*!	\fn	afx_msg void OnButton5()
		按键5消息响应函数
		\param	无
		\return	无
	*/

	/*!	\fn	afx_msg void OnButton6()
		按键6消息响应函数
		\param	无
		\return	无
	*/

	/*!	\fn	afx_msg void OnButton7()
		按键7消息响应函数
		\param	无
		\return	无
	*/

	/*!	\fn	afx_msg void OnButton8()
		按键8消息响应函数
		\param	无
		\return	无
	*/

	/*!	\fn	afx_msg void OnButton9()
		按键9消息响应函数
		\param	无
		\return	无
	*/

	/*!	\fn	afx_msg void OnButton10()
		按键*消息响应函数
		\param	无
		\return	无
	*/

	/*!	\fn	afx_msg void OnButton11()
		按键#消息响应函数
		\param	无
		\return	无
	*/

	/*!	\fn	afx_msg void OnSetfocusEditMsg()
		光标进入消息显示\编辑框消息响应函数
		\param	无
		\return	无
	*/

	/*!	\fn	afx_msg void OnSetfocusEditNum()
		光标进入号码编辑框消息响应函数
		\param	无
		\return	无
	*/

	/*!	\fn	afx_msg	LRESULT OnNotify(WPARAM wParam, LPARAM lParam)
		状态显示区消息响应函数
		\param	无
		\return	无
	*/

	/*!	\fn	afx_msg OnDestroy()
		窗口销毁消息响应函数
		\param	无
		\return	无
	*/

	/*!	\fn	afx_msg OnButtonReset()
		清空按键消息响应函数
		\param	无
		\return	无
	*/

	/*!	\fn	afx_msg void OnButtonMsgback()
		清除消息显示\编辑框最后一个字符按键消息响应函数
		\param	无
		\return	无
	*/

	// Generated message map functions
	//{{AFX_MSG(CGPRSDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnButtonBack();
	afx_msg void OnButtonCall();
	afx_msg void OnButtonSend();
	afx_msg void OnButton0();
	afx_msg void OnButton1();
	afx_msg void OnButton10();
	afx_msg void OnButton11();
	afx_msg void OnButton21();
	afx_msg void OnButton3();
	afx_msg void OnButton4();
	afx_msg void OnButton5();
	afx_msg void OnButton6();
	afx_msg void OnButton7();
	afx_msg void OnButton8();
	afx_msg void OnButton9();
	afx_msg void OnSetfocusEditMsg();
	afx_msg	LRESULT OnNotify(WPARAM wParam, LPARAM lParam);
	afx_msg void OnDestroy();
	afx_msg void OnButtonReset();
	afx_msg void OnButtonMsgback();
	afx_msg void OnSetfocusEditNum();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	CGPRSer m_gprs;
};
//@}

//{{AFX_INSERT_LOCATION}}
// Microsoft eMbedded Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_GPRSDLG_H__801B9198_332F_47B7_9715_D6704657BF95__INCLUDED_)

⌨️ 快捷键说明

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