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

📄 d260.bmp.txt

📁 Visual C++通信编程实例
💻 TXT
字号:
260
void CGsmGprsView::OnButtonSend()
 {
             // TODO: Add your control notification handler code here
         CComboBox* pNumberWnd=(CComboBox*)GetDlgltem(IDC_NUMBER);
         CComboBox* pContentWnd=(CComboBox*)GetDlgltem(IDC_CONTENT);
CString strSmsc;
CString strNumber;
CString strContent;
strSmsc = theApp.m_strSmsc;
 pNumberWnd->GetWindowText(strNumber) ;
 pContentWnd->GetWindowText(s臼Content) ;
/,检查号码
if(strNumber.GetLength0< 11)
{
    AfxMessageBox(”请输入正确的号码!”);
    pNumberWnd->SetFocus0;
    pNumberWnd->SetEditSel(-l, 0);
    return;
l
/,检查短消息内容是否空,或者超长
CString strUnicode;
WCHAR wchar[1024];
int nCount=::MultiByteToWideChar(CP_ACP,0,strContent, -1, wchar, 1024);
if(nCount<=1)
{
    AfxMessageBox(“请输入消息内容!”);
    pContentWnd->SetFocus();
    //pContentWnd->SetEditSel(-l, 0);
    retum;
l
 else if(nCount> 70)    ,/我们决定全部用UCS2编码,最大70个字符(半角,全角)
{
    AfxMessageBox(”消息内容太长,无法发送!”);
    pContentWnd->SetFocus0;
    pContentWnd->SetEditSel(-l, 0);
    return;
)
if(AfxMessageBox(”确定发送吗?”,MB_YESNO)==IDYES)
{
    SM PARAM SmParam;

⌨️ 快捷键说明

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