d261.bmp.txt

来自「Visual C++通信编程实例」· 文本 代码 · 共 37 行

TXT
37
字号
memset(&SmParam, 0, sheof(SM_PARAM》;
//去掉号码前的”+”
if(strSmsc[OJ==’¨strSmsc= strSmsc.Mid(l);
if(strNumber[0]==’+’)strNumber= strNumber.Mid(l);
//在号码前加”86”
if(strSmsc.Left(2)f-”86”)strSmsc=”86”+strSmsc,
if(strNumber.Left(2)1-”86”)strNumber=”86”+strNumber;
//填充短消息结构
strcpy(SmParam.SCA, strSmsc);
strcpy(S mParam.TPA,  strNumber);
strcpy(SmParam.TP_UD, strContent);
SmParam.TP_PID=O:
SmParam.TP_DCS= GSM_UCS2;
/,发送短消息
theApp.m_pSmsTraffic->PutSendMessage(&SmParam);
if(pNumberWnd->FindStringExact(-l, strNumber)<0)
         pNumberWnd->lnsertString(0, strNumber);
if(pContentWnd->FindStringExact(-l, strContent)<0)
        pContentWnd->InsertString(0, strContent);
pContentWnd->SetFocus0;
pContentWnd->SetEditSel(-l, 0);
    力“初始化GPRS”按钮(IDC_BUITON_INITGPRS)添加针对BN_CLICKED消息响
应事件的函数,并编辑该函数。
void CGsmGprsView::OnButtonlnitgprs()
{
    ,, TODO: Add your control notification handler code here
    //初始化GPRS
    if(lnit_GprsO==FALSE)
    {
    AfxMessageBox(”初始化失败”);
    return;
    }
    else
    AfxMessageBox(”初始化成功”);
261

⌨️ 快捷键说明

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