diff options
Diffstat (limited to 'alf/alf.cpp')
| -rw-r--r-- | alf/alf.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/alf/alf.cpp b/alf/alf.cpp index 84ba71d..a4abca6 100644 --- a/alf/alf.cpp +++ b/alf/alf.cpp @@ -411,3 +411,22 @@ ALF_SetFocus(HWND target) else SendMessage(target, WM_NEXTDLGCTL, (WPARAM)target, TRUE); } + +int +ALF_MessageBox(HWND hwnd, const TCHAR *text, const TCHAR *caption, UINT type) +{ + ALFApplication *app = NULL; + + if (GetWindowThreadProcessId(hwnd, NULL) == GetCurrentThreadId()) + app = ALF_Toplevel_Application(hwnd); + + if (app) + ALF_Application_DisableWindowsForModal(app, hwnd); + + int retval = MessageBox(hwnd, text, caption, type); + + if (app) + ALF_Application_ReenableWindowsForModal(app, hwnd); + + return retval; +} |
