关于VC中得到窗体标题

怎样得到另一个窗体的标题文本用GetDlgItemText函数具体怎样实现?谢谢!谢谢2位请问具体怎么实现比如获得一个VB窗体的标题并保留到str中... 怎样得到另一个窗体的标题文本
用GetDlgItemText函数具体怎样实现?谢谢!
谢谢2位 请问具体怎么实现 比如获得一个VB窗体的标题 并保留到str中
展开
 我来答
百度网友73d8a3d6b
2008-05-20 · TA获得超过650个赞
知道答主
回答量:245
采纳率:0%
帮助的人:324万
展开全部
CWnd::GetDlgItemText
Call this member function to retrieve the title or text associated with a control in a dialog box.
//用这个函数重新得到对话框的标题

int GetDlgItemText(
int nID,
LPTSTR lpStr,
int nMaxCount
) const;
int GetDlgItemText(
int nID,
CString& rString
) const;

Parameters//参数
nID
Specifies the integer identifier of the control whose title is to be retrieved.
//对话框的ID号
lpStr
Points to the buffer to receive the control's title or text.
//读取后存放标题的指针型变量
nMaxCount
Specifies the maximum length (in characters) of the string to be copied to lpStr. If the string is longer than nMaxCount, it is truncated.
//定义字符串的最大尺寸,如果超过这个尺寸,将被切除掉.这个尺寸是上一参数lpStr的尺寸
rString
A reference to a CString.
//一个访问的字符串?
Return Value//反回值
Specifies the actual number of characters copied to the buffer, not including the terminating null character. The value is 0 if no text is copied.
//指定一个给定尺寸的字符串型的缓存,这个字符串的结尾不是NULL(\0)
如果,没有读到标题,返回值为0
Remarks
The GetDlgItemText member function copies the text to the location pointed to by lpStr and returns a count of the number of bytes it copies.
//这个函数,通过参数lpStr来传递标题,并返回标题的字节数.
Requirements
Header: afxwin.h
kingstarer
2008-05-20 · TA获得超过584个赞
知道小有建树答主
回答量:516
采纳率:0%
帮助的人:525万
展开全部
HWND FindWindow( LPCTSTR lpClassName,
LPCTSTR lpWindowName
);
Parameters

lpClassName
[in] Pointer to a null-terminated string that specifies the class name or a class atom created by a previous call to the RegisterClass or RegisterClassEx function. The atom must be in the low-order word of lpClassName; the high-order word must be zero.
If lpClassName points to a string, it specifies the window class name. The class name can be any name registered with RegisterClass or RegisterClassEx, or any of the predefined control-class names.

If lpClassName is NULL, it finds any window whose title matches the lpWindowName parameter.

lpWindowName
[in] Pointer to a null-terminated string that specifies the window name (the window's title). If this parameter is NULL, all window names match.
----------------------------------
或者GetDlgItem
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式