EM_SETREADONLY
来源:互联网 发布:粒子群算法工具箱下载 编辑:程序博客网 时间:2024/03/28 22:03
::SendMessage(CWnd::GetSafeHwnd(), EM_SETREADONLY, (WPARAM)(BOOL)TRUE, 0);
上面的消息可以设置Edit控件为只读属性。
想改窗口属性可用m_Edit.ModifyStyle(0,ES_READONLY)无效?
后来又改成
DWORD dwStyle = ::GetWindowLong(m_eInputEnglish.m_hWnd, GWL_STYLE);
DWORD dwNewStyle =( dwStyle| ES_READONLY);
if (dwStyle == dwNewStyle)
return ;
::SetWindowLong(m_eInputEnglish.m_hWnd,GWL_EXSTYLE, dwNewStyle);
还是没有用?
Note : For some styles in certain controls (the ES_READONLY style in the edit control, for example), ModifyStyle may not properly change the style because the control may need to perform special internal processing. In these cases, a corresponding message to change the style will be available (EM_SETREADONLY in the example mentioned).
your can change eidt Style as below
::SendMessage(m_ctlEdit.m_hWnd,EM_SETREADONLY,TRUE,0);
- EM_SETREADONLY
- 试用GoogleMap
- 构造使用IN子句的动态Transact-SQL方法进行编号查询
- 打败你的十五个坏习惯
- word中,backspace删除使用问题
- 为VB应用程序添加英汉翻译功能
- EM_SETREADONLY
- 远程桌面登不起,出现加载个人设置就不动了
- VIM学习笔记
- csdn中如何快速获取可用分?(为了方便看)
- nginx日志管理
- [数据结构]链表创建、打印、反转
- FreeRadius 1.1.7 + Postgresql 8.1.5 (FreeBSD 6.1系统)
- T-sql 学习(2) - join与group by
- OracleJOB的建立,定时执行任务