I know this is often required, but there is no built-in input window in MFC, so you have to create your own. Usually I just create a simple dialog with a shortcut and an edit field (the dialog already goes with the OK / Cancel buttons), then create a class, say CInputDlg , add member variables for the shortcut and edit field and just call it like any other dialog:
CInputDlg dialog; dialog.m_label = TEXT("Enter a number:"); if (dialog.DoModal() == IDOK) {
source share