千妈小语

关注

Enter Key change to next focus in VC

千妈小语

关注

阅读 77

2022-08-22


Need to capture enter key message, in OnBnClickedOk() function, then add below code:


 

CWnd* pwndCtrl = GetFocus();
CWnd* pwndCtrlNext = pwndCtrl;
int ctrl_ID = pwndCtrl->GetDlgCtrlID();


switch (ctrl_ID) {
case IDC_Name:
pwndCtrlNext = GetDlgItem(IDC_PASSWORD);
pwndCtrlNext->SetFocus();
return;
//break;
default:
break;
}

相关推荐

小月亮06

ENTER Key change the focus of Edit Controls

小月亮06 58 0 0

东方小不点

Next-Key Locks

东方小不点 52 0 0

小a草

Innodb锁机制:Next-Key Lock 浅谈

小a草 157 0 0

幸甚至哉歌以咏志

1833 -Cannot change column ‘DEPTNO‘: used in a foreign key constraint ‘...‘ of table ‘...‘

幸甚至哉歌以咏志 112 0 0

闲云困兽

putty连接设备时报错 Can’t agree a key change algorithm

闲云困兽 95 0 0

椰果玩安卓

Isolation level, unreal read, gap lock, next key lock

椰果玩安卓 73 0 0

独兜曲

避免幻读 : next-key锁与MVCC

独兜曲 184 0 0

自由的美人鱼

How to remove focus without setting focus to another control?

自由的美人鱼 84 0 0

芭芭蘑菇

理解innodb的锁(record,gap,Next-Key lock)

芭芭蘑菇 224 0 0

_karen

jquery textbox enter

_karen 8 0 0

精彩评论(0)

0 0 举报