You can specify any ID you want to. The normal ID used for 'don't care' is IDC_STATIC (-1). The ID will be used if you want to retrieve the control by its ID, such as when calling GetDlgItem, GetDlgItemText, SetDlgItemText, etc. The only way you could get the 'next available ID' would be to walk the window's child controls using GetWindow (get the first with GW_CHILD, then use GW_HWNDNEXT to get subsequent children) calling GetDlgCtrlID on each one.