Visual c++ 如何在Visual C+;中设置文本框的值+; 如何在VisualC++中设置文本框的值? 我一直在尝试以下操作,但行strTemp.Format(“%d”,nNbr);不编译 谢谢

Visual c++ 如何在Visual C+;中设置文本框的值+; 如何在VisualC++中设置文本框的值? 我一直在尝试以下操作,但行strTemp.Format(“%d”,nNbr);不编译 谢谢,visual-c++,mfc,Visual C++,Mfc,您可能需要使用宏来支持应用程序的ANSI和UNICODE版本: int nNbr = 5; CString strTemp; strTemp.Format(_T("%d"), nNbr); textBox.SetWindowText(strTemp); 您可能需要使用宏来支持应用程序的ANSI和UNICODE版本: int nNbr = 5; CString strTemp; strTemp.Format(_T("%d"), nNbr); textBox.SetWindowText(strTe

您可能需要使用宏来支持应用程序的
ANSI
UNICODE
版本:

int nNbr = 5;
CString strTemp;
strTemp.Format(_T("%d"), nNbr);
textBox.SetWindowText(strTemp);

您可能需要使用宏来支持应用程序的
ANSI
UNICODE
版本:

int nNbr = 5;
CString strTemp;
strTemp.Format(_T("%d"), nNbr);
textBox.SetWindowText(strTemp);