diff options
Diffstat (limited to 'frontends/windows/gui.c')
-rw-r--r-- | frontends/windows/gui.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/frontends/windows/gui.c b/frontends/windows/gui.c index fdfafcf42..9a2c13b23 100644 --- a/frontends/windows/gui.c +++ b/frontends/windows/gui.c @@ -182,3 +182,17 @@ nserror win32_warning(const char *warning, const char *detail) } +/* exported function documented in windows/gui.h */ +nserror +win32_report_nserror(nserror error, const char *detail) +{ + size_t len = 1 + + strlen(messages_get_errorcode(error)) + + ((detail != 0) ? strlen(detail) : 0); + char message[len]; + snprintf(message, len, messages_get_errorcode(error), detail); + MessageBox(NULL, message, "Warning", MB_ICONWARNING); + + return NSERROR_OK; +} + |