diff options
Diffstat (limited to 'apps/windoze/swwinlog.cpp')
-rw-r--r-- | apps/windoze/swwinlog.cpp | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/apps/windoze/swwinlog.cpp b/apps/windoze/swwinlog.cpp new file mode 100644 index 0000000..cf7d8e8 --- /dev/null +++ b/apps/windoze/swwinlog.cpp @@ -0,0 +1,74 @@ +//--------------------------------------------------------------------------- +#include <vcl\vcl.h> +#pragma hdrstop + +#include "swwinlog.h" +#include <stdio.h> +#include <conio.h> +#include <stdarg.h> +//--------------------------------------------------------------------------- + +SWWinLog::SWWinLog(HWND iparent) : SWLog() { + parent = iparent; +} + + +void SWWinLog::LogWarning(char *fmt, ...) +{ + char msg[2048]; + va_list argptr; + + if (logLevel >= 2) { + va_start(argptr, fmt); + vsprintf(msg, fmt, argptr); + va_end(argptr); + + MessageBox(NULL, msg, "Warning", MB_OK); + } +} + + +void SWWinLog::LogError(char *fmt, ...) +{ + char msg[2048]; + va_list argptr; + + if (logLevel) { + va_start(argptr, fmt); + vsprintf(msg, fmt, argptr); + va_end(argptr); + + MessageBox(NULL, msg, "Error", MB_OK); + } +} + + +void SWWinLog::LogTimedInformation(char *fmt, ...) +{ + char msg[2048]; + va_list argptr; + + if (logLevel >= 4) { + va_start(argptr, fmt); + vsprintf(msg, fmt, argptr); + va_end(argptr); + + MessageBox(NULL, msg, "Information...", MB_OK); + + } +} + + +void SWWinLog::LogInformation(char *fmt, ...) +{ + char msg[2048]; + va_list argptr; + + if (logLevel >= 3) { + va_start(argptr, fmt); + vsprintf(msg, fmt, argptr); + va_end(argptr); + + MessageBox(NULL, msg, "Information", MB_OK); + } +} |