I know how to make a:
"Press any key to continue..."
And how to use MessageBox.
But how would make it in a MessageBox?
Like instead of MB_OK
(Which is is "Ok" button)
What do I need to have?
Printable View
I know how to make a:
"Press any key to continue..."
And how to use MessageBox.
But how would make it in a MessageBox?
Like instead of MB_OK
(Which is is "Ok" button)
What do I need to have?
you have to create your own dialog box -- MessageBox is not able to do that.
In the dialog's OnTranslateMessage, just close the dialog when WM_KEYDOWN message is received. this is MFC example, but similar process in pure win32 api program.
Code:BOOL CPressAnyKeyDlg::PreTranslateMessage(MSG* pMsg)
{
if(pMsg->message == WM_KEYDOWN)
CDialog::OnOK();
return CDialog::PreTranslateMessage(pMsg);
}