MFC 怎么判断是否按下了Ctrl C
OnKeyDown(UINTnChar,UINTnRepCnt,UINTnFlags);case'C':{if(nFlags...
OnKeyDown( UINT nChar, UINT nRepCnt, UINT nFlags );case 'C':{if (nFlags
展开
1个回答
展开全部
void CXXXDlg::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
BOOL bCtrl = GetAsyncKeyState(VK_CONTROL) & 0x8000;
if(bCtrl)
{
switch(nChar)
{
case 'C'://copy
case 'c':
return;
case 'X'://cut
case 'x':
return;
case 'V'://Paste
case 'v':
return;
default :
CDialog::OnKeyDown(nChar, nRepCnt, nFlags);
}
}
}
{
BOOL bCtrl = GetAsyncKeyState(VK_CONTROL) & 0x8000;
if(bCtrl)
{
switch(nChar)
{
case 'C'://copy
case 'c':
return;
case 'X'://cut
case 'x':
return;
case 'V'://Paste
case 'v':
return;
default :
CDialog::OnKeyDown(nChar, nRepCnt, nFlags);
}
}
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询