Maybe I don't understand your question but why not useSince this requires that you're responsible for making sure that cTotal can hold enough characters you might prefer switching to use STL instead.Code:sprintf(cTotal, "Your Wage is %.2f", Total); SetWindowText(GetDlgItem(hwnd, IDC_TOTAL), cTotal);Code:#include <sstream> stringstream str; str << "Your Wage is " << Total; SetWindowText(GetDlgItem(hwnd, IDC_TOTAL), str.str().c_str());




Reply With Quote