[API]
GetDlgItem

[INCLUDE]
SendMessage

[CODE]
Public Function LoadResEx_Dialog_ListIndexCB(ByVal DialogHWnd As Long, ByVal ControlID As Long, ByRef Value As Long, Optional ByVal ReadFromDialog As Boolean = False) As Boolean
  ControlID = GetDlgItem(DialogHWnd, ControlID)
  If Not ControlID = 0& Then
    If ReadFromDialog Then
      ControlID = SendMessage(ControlID, &H147&, 0&, 0&)
      If Not ControlID = Value Then
        Value = ControlID
        LoadResEx_Dialog_ListIndexCB = True
        End If
      Else
      Call SendMessage(ControlID, &H14E&, Value, 0&)
      End If
    End If
  End Function
