In the software I maintain I plan to replace the old MessageBox
by TaskDialog
as suggested by Microsoft UI guidlines already quite some time ago.
The main issue I need to resolve is following:
The old message box invoked via MessageBox(... ,MB_OK)
(thus containing only an OK button) can be dismissed by pressing the Esc key.
But a TaskDialog
containing only an OK button cannot be dismissed by pressing Esc. This might have a negative impact on the user experience.
I tried to use TaskDialogIndirect
using the pfCallback
field, but if the there is no Cancel button in the task dialog, the callback function doesn't even get called.
Any ideas what can be done so Esc will dismiss such a task dialog?