?? shortmessage.h
字號:
// ShortMessage.h: interface for the CShortMessage class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_SHORTMESSAGE_H__C08453D4_9BC3_41C4_8385_507C64793B9D__INCLUDED_)
#define AFX_SHORTMESSAGE_H__C08453D4_9BC3_41C4_8385_507C64793B9D__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "stdafx.h"
#include "afxtempl.h"
#include "SMSPDU.h"
struct CSMSItem
{
CSMSItem()
{
memset(szCallCenter, 0, 20);
memset(szSMSContent, 0, 200);
memset(szDateTime, 0, 20);
memset(szCallNumber, 0, 20);
bstrSMSInfomation=_T("");
}
char szCallCenter[20]; //短信中心
char szSMSContent[200]; //短信內容
char szDateTime[20]; //日期時間
char szCallNumber[20]; //短信發送號碼
COleDateTime dtSMSDateTime; //日期時間,對象形式
/*
CString bstrCallcenter; //短信中心
CString bstrSMSContent; //短信內容
CString bstrDateTime; //日期時間
CString bstrCallNumber; //短信發送號碼
*/
CString bstrSMSInfomation; //短信原始信息
};
//typedef CArray<CSMSItem*, CSMSItem*> CSMSItemArray;
class CShortMessage : public CSMSPDU, CArray<CSMSItem*, CSMSItem*>
{
public:
CShortMessage();
virtual ~CShortMessage();
public:
BOOL GetBOF() { return m_bBOF; } //是否處于第一條
BOOL GetEOF() { return m_bEOF; } //是否處于最后一條
int GetCount() { return GetSize();} //短信的數量
DATE GetDateTime(); //當前短信的日期時間
LPCTSTR GetDateString(); //當前短信的日期時間
LPCTSTR GetCallCenter(); //當前短信的短信中心
LPCTSTR GetCallNumber(); //當前短信的發送號碼
LPCTSTR GetSMSContent(); //當前短信的短信內容
void MoveFirst(); //移到最前
void MovePrev(); //前移
void MoveNext(); //后移
void MoveLast(); //移到最后
void Open(LPCTSTR szSmsInfo); //初始化函數
protected:
char * HexStringToBinString(LPCTSTR szbuff);
char BinStringToChar(LPCTSTR szbuff);
CString Convert7BitString(LPCTSTR szBuf);
void ResolveSMSInfoList(CString bstrInfo);
BOOL ResolveSMSInfo(CSMSItem & pItem, CString bstrInfo);
private:
CString m_szContent; //傳遞進來的原始信息
//CSMSItemArray m_smsItemArray; //保存短信的信息列表
int m_nPos; //當前的游標
BOOL m_bBOF; //游標處于最開始位置
BOOL m_bEOF; //游標處于最末尾位置
};
#endif // !defined(AFX_SHORTMESSAGE_H__C08453D4_9BC3_41C4_8385_507C64793B9D__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -