Ctrl+Z 在VC中如何表示? Ctrl+Z 在VC中如何表示? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 BOOL CXXWnd::PreTranslateMessage(MSG* pMsg){ if( pMsg->message == WM_KEYDOWN ) { BYTE keybytes[256]; memset(keybytes, 0, 256); GetKeyboardState(keybytes); if ( (pMsg->wParam == _T('Z') || pMsg->wParam == _T('z')) && (keybytes[VK_CONTROL] & 0x80) ) { // to do, ctrl + 'z' or ctrl + 'Z' } } return CWnd::PreTranslateMessage(pMsg);} BOOL CXXWnd::PreTranslateMessage(MSG* pMsg) { if( pMsg->message == WM_KEYDOWN ) { BYTE keybytes[256]; memset(keybytes, 0, 256); GetKeyboardState(keybytes); if ( (pMsg->wParam == _T('Z') || pMsg->wParam == _T('z')) && (keybytes[VK_CONTROL] & 0x80) ) { // to do, ctrl + 'z' or ctrl + 'Z' } } return CWnd::PreTranslateMessage(pMsg); } BOOL CXXWnd::PreTranslateMessage(MSG* pMsg) { if( pMsg->message == WM_KEYDOWN ) { if (GetKeyState()& 0x8000) // 按下ctrl键 { if ( pMsg->wParam == _T('Z') ) { // to do, ctrl + 'z' or ctrl + 'Z' } } } return CWnd::PreTranslateMessage(pMsg); } 不好意思 函数GetKeyState(VK_CONTROL);少了里边的参数VK_CONTROL 模版问题,谢谢? 求数据采集程序 怎么在编辑框中显示多行文字 怎么修改本地的网络配置?? ADO是如何管理事务的 怎样修改一个按钮是否可用? 如何获得鼠标状态 一个有关于CreatePolygonRgn函数的问题 如何获得新创建的新窗口 VS.NET β2中文版,4CD只卖20元,大家有何看发???? 新账号发帖做为新开始,呵呵~,开门先送分! 经过跟踪后的一组连续点列,如何做曲线平滑?
{
if( pMsg->message == WM_KEYDOWN )
{
BYTE keybytes[256];
memset(keybytes, 0, 256);
GetKeyboardState(keybytes);
if ( (pMsg->wParam == _T('Z') || pMsg->wParam == _T('z'))
&& (keybytes[VK_CONTROL] & 0x80) )
{
// to do, ctrl + 'z' or ctrl + 'Z'
}
}
return CWnd::PreTranslateMessage(pMsg);
}
{
if( pMsg->message == WM_KEYDOWN )
{
BYTE keybytes[256];
memset(keybytes, 0, 256);
GetKeyboardState(keybytes);
if ( (pMsg->wParam == _T('Z') || pMsg->wParam == _T('z'))
&& (keybytes[VK_CONTROL] & 0x80) )
{
// to do, ctrl + 'z' or ctrl + 'Z'
}
}
return CWnd::PreTranslateMessage(pMsg);
}
{
if( pMsg->message == WM_KEYDOWN )
{
if (GetKeyState()& 0x8000) // 按下ctrl键
{
if ( pMsg->wParam == _T('Z') )
{
// to do, ctrl + 'z' or ctrl + 'Z'
}
}
}
return CWnd::PreTranslateMessage(pMsg);
}