真的给分吗?
if (true)
i will tell you how to do
if (true)
i will tell you how to do
解决方案 »
- 发布VC++使用installshield 发布时,不显示skin皮肤问题
- 工具栏
- 关于文本多行输出的问题,涉及到类型转换
- 如果用数组,怎么判断呢?
- 在线等待,菜鸟急救,如何通过ip获得机器名和操作系统版本!
- 声音控制问题
- 请教:如果我拨号或通过Adsl上网了,我就有Internet IP和局域网IP两个IP,怎么用代码把局域网IP取出来呢?
- FlexGrid 控件怎样和sql数据库进行绑定?
- 转让《深入浅出 MFC 2/e 简体中文版》,多买了一本:(
- 关于 htmlhelp
- 寻人启事:florist2000(善良的石头),我想请求你的帮助!你在哪里啊?
- 请问VC的最新版本是?.0,有中文版吗?
好象是RegistHotKey吧
ctrl+t+e+r+m
重载函数BOOL CXXXDlg::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
static int key = -1;
if( pMsg->message == WM_KEYDOWN )
{
if( pMsg->wParam == VK_CONTROL )
key = 1;
else if( pMsg->wParam != 0x41 &&
pMsg->wParam != 0x42 &&
pMsg->wParam != 0x43 )
key = 0;
}
if( pMsg->message == WM_KEYUP )
{
if( pMsg->wParam == VK_CONTROL )
key = 0;
else if( pMsg->wParam == 0x41 && key == 1 )//A
key = 2;
else if( pMsg->wParam == 0x42 && key == 2 )//B
key = 3;
else if( pMsg->wParam == 0x43 && key == 3 )//C
AfxMessageBox( "Ctrl+A+B+C be pressed!" );
else
key = 0;
}
return CDialog::PreTranslateMessage(pMsg);
}