首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

CEdit EN_UPDATE, How to prevent the typed character from displaying?该如何处理

2012-04-12 
CEdit EN_UPDATE, How to prevent the typed character from displaying?MSDN CEDIT ON_EN_UPDATE:ON_EN_U

CEdit EN_UPDATE, How to prevent the typed character from displaying?
MSDN CEDIT ON_EN_UPDATE:
ON_EN_UPDATE The edit control is about to display altered text. Sent after the control has formatted the text but before it screens the text so that the window size can be altered, if necessary.

But when i input "A" in CEditCtrl.

//the message EN_UPDATE in MainDlg
CMainDlg::OnEnUpdateEditLimited()
{
CString strText;
GetDlgItemText(ID_EDIT_LIMITED, strText);
// strText is "A"
}

Why it is "A", i think it should be null. (ON_EN_UPDATE: "before it screens the text")




My purpose is to determine if the typed Char is wanted, if not, refuse to show it in the windowtext.(Don't Display it.)
(please don't override the CEdit, such as ON_INPUT\ON_CHAR...)
Can I use the MainDlg ON_EN_UPDATE msg to reach the objective?

[解决办法]
screen the text表示显示,没有显示不代表你没法从内存中得到.GetWindowText也不是从显示后的窗口中得到的

热点排行