kbhit阻塞了,不能进行后面的程序,且按任意键都无反应

问题遇到的现象和发生背景

该函数用于打印时间以及闹钟的发生,并当闹钟响起时,按任意键停止。但现在当存在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是直接检测按键是否发生!