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

📄 test.cpp

📁 提供vc版短信网关源码
💻 CPP
字号:
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "test.h"
#include "cmpp.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TFrmTest *FrmTest;
//---------------------------------------------------------------------------
__fastcall TFrmTest::TFrmTest(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TFrmTest::Button1Click(TObject *Sender)
{
  byte msg_frmt;
  if (RadioButton1->Checked == true)
     msg_frmt = 15;
  if (RadioButton2->Checked == true)
     msg_frmt = 8;
  if (RadioButton3->Checked == true)
     msg_frmt = 0;
  if (RadioButton4->Checked == true)
     msg_frmt = 4;
  int iRet = CMPPSubmit("910014",Edit1->Text,Memo1->Text,msg_frmt,"XW","20","02",1,Edit1->Text,Edit2->Text);
  if (iRet == 1)
  {
     MessageBox(FrmTest->Handle,"Socket not conneted","ErrorInfo",MB_OK+MB_ICONERROR);
  }else{
     MessageBox(FrmTest->Handle,"短信已发送","Info",MB_OK);
  }
}
//---------------------------------------------------------------------------
void __fastcall TFrmTest::Button2Click(TObject *Sender)
{
  FrmTest->Close();
}
//---------------------------------------------------------------------------

⌨️ 快捷键说明

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