char str[256] = {0};sprintf(str, "%x", wparam);CString strtext = str;GetDlgItem(IDC_XXX)->SetWindowsText(strtext);
CString str;str.Format("%x", wparam);
str.format(...)