B
Burt
I need to put up a simple modal dialog, and am surprised how hard it seems
to be. Am I missing something here?
I have created a dialog resource IDD_DELETE_S9. It has some static text
plus 3 buttons. The buttons have ids of IDOK, IDCANCEL and IDC_RENAME. All
I want to do is put up this modal dialog asking the user what to do. All I
care is which button he pressed.
I tried using
int answer = DialogBox(0, MAKEINTRESOURCE(IDD_DELETE_S9),
hwnd, (DLGPROC)Import_DialogProc);
but the dialog never shows and it just drops through, giving me a non-useful
'answer'.
Everything I am now reading in MSDN seems to indicate that I need to write a
new class inheriting from CDialog to handle this and return the button
pressed. Is that really needed?
This sure seems like something that should be accomplished in a one-line
call...?
to be. Am I missing something here?
I have created a dialog resource IDD_DELETE_S9. It has some static text
plus 3 buttons. The buttons have ids of IDOK, IDCANCEL and IDC_RENAME. All
I want to do is put up this modal dialog asking the user what to do. All I
care is which button he pressed.
I tried using
int answer = DialogBox(0, MAKEINTRESOURCE(IDD_DELETE_S9),
hwnd, (DLGPROC)Import_DialogProc);
but the dialog never shows and it just drops through, giving me a non-useful
'answer'.
Everything I am now reading in MSDN seems to indicate that I need to write a
new class inheriting from CDialog to handle this and return the button
pressed. Is that really needed?
This sure seems like something that should be accomplished in a one-line
call...?