To obtain the window handle for an item within a dialog box, set hwndParent to the dialog-box window's handle, and set id to the identity of the item in the dialog template.