找回密码
 立即注册
printfstatekeybrdif | 企业管理 2022-09-22 85 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
附件称号:C精典900例
压缩包内文件格式:可执行文件
附件来历:互联网
运行方式:Windows方式
是不是经自己验证:是
附件性质:免费
详细说明:里面都是一些基本使用的代码,很多都是DOS下的,看一下对编程有帮助。
132011
查询键盘状况的代码#includelt;stdio.hgt;
#includelt;bios.hgt;
voidmain(void)
{
unsignedintstate,old_state=0;
do{
state=_bios_keybrd(_KEYBRD_SHIFTSTATUS);
if(state!=old_state)
{
old_state=state;
if(state0x80)
printf(InsOn);
if(state0x40)
printf(CapsOn);
if(state0x20)
printf(NumLockOn);
if(state0x10)
printf(ScrollLockOn);
if(state0x08)
printf(Altpressed);
if(state0x04)
printf(Ctrlpressed);
if(state0x02)
printf(Leftshiftpressed);
if(state0x01)
printf(Rightshiftpressed);
printf(\n);
}
}while(!_bios_keybrd(_KEYBRD_READY));
}

(Attachment title: C Classic 900 Cases
The file format in the compressed package: executable file
Attachment source: Internet
Operation mode: Windows mode
Is it verified by yourself: yes
Attachment nature: free
Detailed description: There are some basic codes in it, many of them are under DOS, and it is helpful for programming.
132011
Code for querying keyboard status#includelt;stdio.hgt;
#includelt;bios.hgt;
voidmain(void)
{
unsignedintstate,old_state=0;
do{
state=_bios_keybrd(_KEYBRD_SHIFTSTATUS);
if(state!=old_state)
{
old_state=state;
if(state0x80)
printf(InsOn);
if(state0x40)
printf(CapsOn);
if(state0x20)
printf(NumLockOn);
if(state0x10)
printf(ScrollLockOn);
if(state0x08)
printf(Altpressed);
if(state0x04)
printf(Ctrlpressed);
if(state0x02)
printf(Leftshiftpressed);
if(state0x01)
printf(Rightshiftpressed);
printf(\n);
}
}while(!_bios_keybrd(_KEYBRD_READY));
})

[下载]14571695705.rar




上一篇:《C++程序设计教程》钱能 清华 习题原版答案全集!!
下一篇:C++