C++输入框
各位大佬:请问C++中如何出现一个输入对话框,MessageBox只能输出信息,该如何让用户输入信息,最简洁的方法,和MessageBox的界面差不多的那种。
程序代码:
#include <iostream>
#include <graphics.h>
#include <windows.h>
using namespace std;
int main()
{
// 初始化绘图窗口
initgraph(640, 480);
// 定义字符串缓冲区,并接收用户输入
WCHAR s[10];
WCHAR p[20] = L"请输入数字";
InputBox((LPTSTR)s, 10, (LPCTSTR)p);
wcout << s << endl;
closegraph();
system("pause");
return 0;
}