现在人们都追求访问量,而不会去真正付出努力去弄。类似QQ空间、博客等等,下面看一个简易的登陆器的实现,先看看效果吧:
这个东西知识响应下按钮的消息,再加上定时器的操作,简单至极,贴代码吧:
m_Begin = true; //Bool变量来实现“开始”与“停止”的切换
这个东西知识响应下按钮的消息,再加上定时器的操作,简单至极,贴代码吧:
void CSinaLogDlg:
:OnBUTTONSina()
{
// TODO: Add your control notification handler code here
ShellExecute(NULL,NULL,"http://blog.sina.com.cn/u/1628556937",NULL,NULL,SW_SHOW);
}
void
CSinaLogDlg::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
if (nIDEvent == 1)
{
if (m_Begin)
{
CSinaLogDlg dlg;
dlg.OnBUTTONSina();
}
}
CDialog::OnTimer(nIDEvent);
}
void CSinaLogDlg::
OnButtonBegin()
{
// TODO: Add your control notification handler code here
}
void CSinaLogDlg::
OnButtonStop()
{
// TODO: Add your control notification handler code here
KillTimer(1);
}