首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

怎么获得句柄

2012-03-27 
如何获得句柄我知道一个控件的ID怎么才能获得它的句柄呀????[解决办法]The GetDlgItem function retrieves

如何获得句柄
我知道一个控件的ID   怎么才能获得它的句柄呀????

[解决办法]
The GetDlgItem function retrieves a handle to a control in the specified dialog box.

Syntax

HWND GetDlgItem( HWND hDlg,
int nIDDlgItem
);
Parameters

hDlg
[in] Handle to the dialog box that contains the control.
nIDDlgItem
[in] Specifies the identifier of the control to be retrieved.
Return Value

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.


热点排行