CString str;str.Format(_T("%d"), your_变量);AfxMessageBox(str);
CString strCap = "Caption";int icap = 555;CString Cap;Cap.Format ( "标题%s\n变量%d", strCap,icap );AfxMessageBox ( Cap.GetString (), MB_OK, 0 );