该函数用于打印时间以及闹钟的发生,并当闹钟响起时,按任意键停止。但现在当存在kbhit时程序堵塞,去除kbhit程序正常运行
void Time_Show(void*)
{
settextstyle(15, 15, _T("黑体"));
setbkmode(TRANSPARENT);
TTIME ttime;
while(1)
{
ttime=Time_Show_Write();
Sleep(1000);
Time_Show_Clear(ttime);
if(!strcmp(ttime.min,alarm_time.min)&&!strcmp(ttime.hour,alarm_time.hour)&&!strcmp(ttime.sec,"0"))
{
outtextxy(270, 100, ttime.hour);//打印时
PlayMusic("D:\\music\\You_Never_Leave.mp3");
}
if(_kbhit())//阻塞了,上面的都不能打印了
{
mciSendString("close bkmusic",NULL,0,NULL);
}
outtextxy(390, 400, "00000000");//测试,阻塞打印不了
if(singal==CLOSE)
{
singal=OPEN;
_endthread();
}
}
}
“登录界面.exe”: 已加载“D:\C语言\惊刹\登录界面\project\登录界面\Debug\登录界面.exe”,已加载符号。
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\ntdll.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\kernel32.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\KernelBase.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\user32.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\win32u.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\winmm.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\gdi32.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\msvcr100d.dll”,已加载符号。
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\gdi32full.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\msvcrt.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\msvcp_win.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\ucrtbase.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\shell32.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\ole32.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\rpcrt4.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\combase.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\imm32.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\kernel.appcore.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\bcryptprimitives.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\uxtheme.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\ProgramData\A-Volute\A-Volute.Nahimic\Modules\Scheduled\AudioDevProps2.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\advapi32.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\sechost.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\ws2_32.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\shlwapi.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.19041.1466_none_d951c753e1040cbe\GdiPlus.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\SHCore.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\msctf.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\oleaut32.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\TextInputFramework.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\CoreMessaging.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\CoreUIComponents.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\ntmarta.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\WinTypes.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已卸载“C:\Windows\SysWOW64\WinTypes.dll”
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\WinTypes.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已卸载“C:\Windows\SysWOW64\WinTypes.dll”
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\oleacc.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\WindowsCodecs.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\bcrypt.dll”,Cannot find or open the PDB file
“登录界面.exe”: 已加载“C:\Windows\SysWOW64\TextShaping.dll”,Cannot find or open the PDB file
线程 'Win32 线程' (0x367c) 已退出,返回值为 0 (0x0)。
线程 'Win32 线程' (0x4c5c) 已退出,返回值为 0 (0x0)。
线程 'Win32 线程' (0x46dc) 已退出,返回值为 0 (0x0)。
线程 'Win32 线程' (0x480c) 已退出,返回值为 0 (0x0)。
线程 'Win32 线程' (0x505c) 已退出,返回值为 -1073741510 (0xc000013a)。
线程 'Win32 线程' (0x317c) 已退出,返回值为 -1073741510 (0xc000013a)。
线程 'Win32 线程' (0x404) 已退出,返回值为 -1073741510 (0xc000013a)。
线程 'Win32 线程' (0x4380) 已退出,返回值为 -1073741510 (0xc000013a)。
线程 'Win32 线程' (0x1304) 已退出,返回值为 -1073741510 (0xc000013a)。
线程 'Win32 线程' (0x41cc) 已退出,返回值为 -1073741510 (0xc000013a)。
线程 'Win32 线程' (0x5a0) 已退出,返回值为 -1073741510 (0xc000013a)。
线程 'Win32 线程' (0x4528) 已退出,返回值为 -1073741510 (0xc000013a)。
线程 'Win32 线程' (0x199c) 已退出,返回值为 -1073741510 (0xc000013a)。
线程 'Win32 线程' (0x213c) 已退出,返回值为 -1073741510 (0xc000013a)。
程序“[20344] 登录界面.exe: 本机”已退出,返回值为 -1073741510 (0xc000013a)。
kbhit是直接检测按键是否发生!