I was wondering if there was a way to format a string inside a listbox to have tabs. Like \t in dos. I am trying to format seperate text box entries into 1 list box entry with each one tabed apart so it will line up with the next entry below it. This way, if the first part of the string has more letters than the one above it, the second part of the strings will line up still. Here is how im putting together the text box entries into 1 string and passing that string. I am using the MSVC++ editor so it does not have the listview feature, just listbox. Here is what i have so far.
Code:char *buf = (char *)GlobalAlloc(GPTR, len + 1); char *buf2 = (char *)GlobalAlloc(GPTR, len2 + 1); char *buf3 = (char *)GlobalAlloc(GPTR, len3 + 1); char *buf4 = (char *)GlobalAlloc(GPTR, len4 + 1); GetDlgItemText(hwnd, IDC_COURSE_NAME, buf, len + 1); GetDlgItemText(hwnd, IDC_SCORE, buf2, len2 + 1); GetDlgItemText(hwnd, IDC_SLOPE, buf3, len3 + 1); GetDlgItemText(hwnd, IDC_COURSE_RATING, buf4, len4 + 1); char *fullString = (char *)GlobalAlloc(GPTR, (len + len2 + len3 + len4 + 1)); strcat(fullString, buf); strcat(fullString, buf2); strcat(fullString, buf3); strcat(fullString, buf4); int index = SendDlgItemMessage(hwnd, IDC_SCORES_LIST, LB_ADDSTRING, 0, (LPARAM)fullString);



LinkBack URL
About LinkBacks


