Code:
  int rtf_listbox_get_line;
                                  rtf_listbox_get_line=SendMessage(rtfctl,EM_LINEFROMCHAR,negative,0)+1;
                                  stringstream lbsl;
                                  lbsl << rtf_listbox_get_line;
                                  SendMessage(Line_Count,LB_SELECTSTRING,0,(LPARAM&)lbsl.str()); 
                                  //cout << "Listbox Line:"<< lbsl.str()<<endl;
That will select the number from the listbox indicating the current line you are on in the rich text box.

I use some other code for my rtf on key change and stuff that will add the line number to the listbox.