diff options
author | danglassey <danglassey> | 2002-08-14 09:57:17 +0000 |
---|---|---|
committer | danglassey <danglassey> | 2002-08-14 09:57:17 +0000 |
commit | daa67ff1f728c07f2a116ee9a9f4505479ca6808 (patch) | |
tree | c224a537d30480002ae0560cc9104b543b4d1b5e /apps/windoze/swwinlog.cpp | |
parent | 6d6973e035aac5ec1676efccd5b8ada70c40b639 (diff) | |
download | sword-sf-cvs-daa67ff1f728c07f2a116ee9a9f4505479ca6808.tar.gz |
Initial import from crosswire CVS for syncingimport-1.1.1
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); + } +} |