精华区 [关闭][返回]

当前位置:网易精华区>>讨论区精华>>编程开发>>C/C++>>WINDOWS界面设计>>编辑框问题

主题:编辑框问题
发信人: gzlujiang()
整理人: skyice(1999-11-13 15:05:04), 站内信件
【 在 skyice (skyline) 的大作中提到: 】
: 在程序运行期间如何使一个编辑框只读,不是disable?

向编辑框发送EM_SETREADONLY消息,其在WIN32API中定义如下:

An application sends an EM_SETREADONLY message to set or remove the re
ad-only style (ES_READONLY) of an edit control. 

EM_SETREADONLY  
wParam = (WPARAM) (BOOL) fReadOnly;  // read-only flag 
lParam = 0;                          // not used; must be zero 
 

Parameters

fReadOnly

Value of wParam. Specifies whether to set or remove the ES_READONLY st
yle. A value of TRUE sets the ES_READONLY style; a value of FALSE remo
ves the ES_READONLY style. 

 

Return Values

If the operation succeeds, the return value is nonzero; otherwise, it 
is zero. 

Remarks

When an edit control has the ES_READONLY style, the user cannot change
 the text within the edit control. 
To determine whether an edit control has the ES_READONLY style, use th
e GetWindowLong function with the GWL_STYLE flag. 

--
※ 来源:.月光软件站 http://www.moon-soft.com.[FROM: 202.96.190.124]

[关闭][返回]




月光软件程序下载编程文档电脑教程网站设计网址导航网络文学游戏天地幽默笑话生活休闲写作范文安妮宝贝
电脑技术编程开发网络专区谈天说地情感世界游戏元素分类游戏热门游戏体育运动手机专区业余爱好影视沙龙
音乐天地数码广场教育园地科学大观古今纵横谈股论金人文艺术医学保健动漫图酷二手专区地方风情各行各业

月光软件站·版权所有