That didn't work.
Here is the code for my output function.
note I am sending main_window_handl,szstring to the function
Code:
void vShowText(HWND hChildHandle, char *szText)
{
int Line;
// add string to the listbox
SendMessage(GetDlgItem( hChildHandle, IDC_SESSIONS ),LB_ADDSTRING,(WPARAM)strlen(szText),(LPARAM)szText);
// determine number of items in listbox
Line = SendMessage(GetDlgItem( hChildHandle, IDC_SESSIONS ),LB_GETCOUNT,0,0);
// flag last item as the selected item, to scroll listbox down
SendMessage(GetDlgItem( hChildHandle, IDC_SESSIONS ),LB_SETCURSEL,Line-1,0);
// unflag all items to eliminate negative highlite
SendMessage(GetDlgItem( hChildHandle, IDC_SESSIONS ),LB_SETCURSEL,-1,0);
EnableWindow(GetDlgItem(hChildHandle, IDC_SESSIONS ), FALSE );
}