Simple Question:  VB6 Listbox problems

Hey AF,

Was wondering if anybody can point me in the right direction here.
I am trying to load a listbox, sitting on a dialogbox, with an array of integers... But the darn thing keeps giving me errors.

void CDB2Dlg::OnNEXT() 
{
  iTIME[iCOUNTER]  =  GetDlgItemInt( IDC_EDIT1 , NULL, 0 );
  iCOUNTER++;
  for( int t=0; t<65; t++ )
  {
    IDC_LIST1.AddItem( IDC_LIST1, iTIME[t] );
    //IDD_DB2_DIALOG.IDC_LIST1.ItemData(iTIME[t]);
    //IDD_DB2_DIALOG.IDC_LIST1.ControlSource = iTIME[t];
  }
  //if( iTIME[iCOUNTER] == 8 )
  //  DestroyWindow( );
}

On the push of the 'OnNEXT' button i want the LISTBOX to fill with the values, but I do not know of this class/struct/union it speaks of?

Can YOU help me?

Is it safe to assume that IDC_LIST1 is the LISTBOX in question?

If so, why are you passing it to the AddItem method. The AddItem method takes one argument - the item (string) to add to the list.

Thats just how I left the code - sorry.
I tried just passing it the string, or value as is the case, but it still gives me the error...

--------------------Configuration: DB2 - Win32 Debug--------------------
Compiling...
DB2Dlg.cpp
C:\Users\ELSE\Desktop\DB2\DB2Dlg.cpp(211) : error C2228: left of '.AddItem' must have class/struct/union type
Error executing cl.exe.

Well, that means that the ListBox object is NOT IDC_LIST1. Select it, and use the Properties tab to find it's name.