工大后院

 找回密码
 加入后院

扫一扫,访问微社区

QQ登录

只需一步,快速开始

搜索
查看: 2532|回复: 5

VC问题

[复制链接]
发表于 2008-5-18 11:31 | 显示全部楼层 |阅读模式
请问如何查询编辑框中的文本,是多行的,书本上只是说了调用GetLineCount和GetLine函数,但是就没有提供进一步的操作,请赐教!!
发表于 2008-5-18 13:07 | 显示全部楼层
不知道你要表达什么
回复

使用道具 举报

发表于 2008-5-18 13:18 | 显示全部楼层
回复

使用道具 举报

发表于 2008-5-18 13:18 | 显示全部楼层
进一步再有疑惑再发帖问吧。。
回复

使用道具 举报

发表于 2008-5-18 14:51 | 显示全部楼层
关于编辑框的成员函数,LZ  查查资料吧  网上大把,书上大把,如果你实在懒的话 加我QQ吧
351302113  ,我自己有总结那些控件的函数
回复

使用道具 举报

发表于 2008-5-26 18:58 | 显示全部楼层
msdn啊 不然直接打到vc,看里面的参数也能猜出几分

以下引自msdn

CEdit::GetLineCount See Also
CEdit Overview | Class Members | Hierarchy Chart
Call this function to retrieve the number of lines in a multiple-line edit control.

int GetLineCount( ) const;
Return Value
An integer containing the number of lines in the multiple-line edit control. If no text has been entered into the edit control, the return value is 1.

Remarks
GetLineCount is only processed by multiple-line edit controls.

For more information, see EM_GETLINECOUNT in the Platform SDK.

-------------------------------------------------------------------------------------------------------
CEdit::GetLineSee Also
CEdit Overview | Class Members | Hierarchy Chart | CEdit::LineLength | CWnd::GetWindowText
Call this function to retrieve a line of text from an edit control and places it in lpszBuffer.

int GetLine(
   int nIndex,
   LPTSTR lpszBuffer
) const;
int GetLine(
   int nIndex,
   LPTSTR lpszBuffer,
   int nMaxLength
) const;
Parameters
nIndex
Specifies the line number to retrieve from a multiple-line edit control. Line numbers are zero-based; **alue of 0 specifies the first line. This parameter is ignored by a single-line edit control.
lpszBuffer
Points to the buffer that receives a copy of the line. The first word of the buffer must specify the maximum number of bytes that can be copied to the buffer.
nMaxLength
Specifies the maximum number of bytes that can be copied to the buffer. GetLine places this value in the first word of lpszBuffer before making the call to Windows.
Return Value
The number of bytes actually copied. The return value is 0 if the line number specified by nIndex is greater than the number of lines in the edit control.

Remarks
The copied line does not contain a null-termination character.

For more information, see EM_GETLINE in the Platform SDK.

Example
See the example for CEdit::GetLineCount.

See Also
CEdit Overview | Class Members | Hierarchy Chart | CEdit::LineLength | CWnd::GetWindowText



--------------------------------------------------------------------------------
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 加入后院

本版积分规则

QQ|Archiver|手机版|小黑屋|广告业务Q|工大后院 ( 粤ICP备10013660号 )

GMT+8, 2024-6-1 13:24

Powered by Discuz! X3.5

Copyright © 2001-2024 Tencent Cloud.

快速回复 返回顶部 返回列表