String("短信猫设置","是否设置","default",buf,128,"./NoteSet.ini");
isnum.Format("%s",buf);
if(isnum == "1")
{
if(GSMModemInitNew((char*)(LPCTSTR)port,(char*)(LPCTSTR)baud,
NULL,NULL,FALSE,(char*)(LPCTSTR)accredit)==FALSE)
{
MessageBox((char*)GSMModemGetErrorMsg());
}
}
SetTimer(1,500,NULL); //设置定时器
return TRUE; // return TRUE unless you set the focus to a control
}
void CBookFriendDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
{
CAboutDlg dlgAbout;
dlgAbout.DoModal();
}
else
{
CDialog::OnSysCommand(nID, lParam);
}
}
// If you add a minimize button to your dialog, you will need the code below
// to draw the icon. For MFC applications using the document/view model,
// this is automatically done for you by the framework.
void CBookFriendDlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // device context for painting
SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CDialog::OnPaint();
}
}
// The system calls this to obtain the cursor to display while the user drags
// the minimized window.
HCURSOR CBookFriendDlg::OnQueryDragIcon()
{
return (HCURSOR) m_hIcon;
}
void CBookFriendDlg::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
CString sText,sleft,sright;
int len;
sText = m_StatusBar.GetPaneText(2); //获得状态栏第3个面板的显示字符
len = sText.GetLength();
sright = sText.Left(2);
sleft = sText.Right(len-2);
sText = sleft + sright;
m_StatusBar.SetPaneText(2,sText); //设置状态栏第3个面板的显示字符
CString p
上一篇:
BookFriend.cpp
下一篇:
软件工程毕业设计论文