解释一下MFC中的GetDlgItem是什么意思

最好举个例子解释一下,感谢!!... 最好举个例子解释一下,
感谢!!
展开
 我来答
L_o_o_n_i_e
推荐于2017-09-14 · TA获得超过4.2万个赞
知道大有可为答主
回答量:8507
采纳率:38%
帮助的人:5062万
展开全部
Dlg -- 对话窗,一个控件。
根据一个对话窗或一个控件的ID, 返回一个指向这个对话窗或控件的对象的指针。

例如,IDC_EDIT1 是 控件的ID
CEdit* pBoxOne;
pBoxOne = (CEdit*) GetDlgItem(IDC_EDIT1);
用 GetDlgItem(IDC_EDIT1); 返回一个指向这个控件的指针, CEdit* ,存入 pBoxOne。

接下来,就可以用它了,例如:
GotoDlgCtrl(pBoxOne);
372632453
2010-07-01 · TA获得超过930个赞
知道小有建树答主
回答量:649
采纳率:0%
帮助的人:541万
展开全部
获得指定对话框的类容
The GetDlgItem function retrieves a handle to a control in the specified dialog box.

HWND GetDlgItem(
HWND hDlg, // handle to dialog box
int nIDDlgItem // control identifier
);
Parameters
hDlg
[in] Handle to the dialog box that contains the control.
nIDDlgItem
[in] Specifies the identifier of the control to be retrieved.
Return Values
If the function succeeds, the return value is the window handle of the specified control.

If the function fails, the return value is NULL, indicating an invalid dialog box handle or a nonexistent control. To get extended error information, call GetLastError.
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

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

类别

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

说明

0/200

提交
取消

辅 助

模 式