Hi could anyone explain to me what this function is doing, I am currently reading a programming book and am struggling to follow this function.

From what I can gather the function take in a handle to a window (in this case a dialog box), then information is passed in the second param and the third param being a pointer to the actual object.

To give some context I'm trying to populate a combo box with the adapters that a computer has.

```
void AddItem(HWND hWnd, char *ch, void *pData) 
{
  WPARAM nI = (WPARAM)((int)(DWORD)SendMessage(hWnd,CB_ADDSTRING,0,(LPARAM)ch));

  SendMessage(hWnd,CB_SETITEMDATA, nI, (LPARAM)pData);
}

```

here is an example call:

```
for (UINT a=0; a<m_dwNumAdapters; a++) 
{
   AddItem(m_hADAPTER, m_xAdapterInfo[a].d3dAdapterIdentifier.Description,
           &m_xAdapterInfo[a]);
}

```

Thanks.