int vari=10;
MessageBox(NULL, "<3 FAMOUS 10 <3 ","Lesson1", MB_OKCANCEL);
我想在下面的消息框中显示变量,我该怎么做?
最佳答案
使用CString::Format
创建类似于 printf
的消息:
#include <afx.h>
int vari=10;
CString msg;
msg.Format( _T("value = %d"), vari );
MessageBox(NULL, msg, _T("Lesson1"), MB_OKCANCEL);
关于c++ - win32 GUI 在窗口中显示来自 int 变量的数字,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34418353/