Name

GetDlgItem

Synopsis

Returns a handle to a specified control in a dialog box:

Public Declare Function GetDlgItem Lib "user32" Alias "GetDlgItem" _
		(ByVal hDlg As Long, ByVal nIDDlgItem As Long) As Long

Parameters

hDlg

The handle to the dialog box where the control is located. This can be either the default common dialog box or the child dialog box.

nIDDlgItem

The ID of the control in the resource file.

Return Value

Returns the handle of the control that you specify. Otherwise, returns a 0.

Get Subclassing and Hooking with Visual Basic now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.