aboutsummaryrefslogtreecommitdiffstats
path: root/apps/windoze/swwinlog.cpp
diff options
context:
space:
mode:
authordanglassey <danglassey>2002-08-14 09:57:17 +0000
committerdanglassey <danglassey>2002-08-14 09:57:17 +0000
commitc9458897ebbb739d8db83c80e06512d8a612f743 (patch)
treef8c5381045887e34388cc6b26cfccc254bf766dc /apps/windoze/swwinlog.cpp
downloadsword-sf-cvs-c9458897ebbb739d8db83c80e06512d8a612f743.tar.gz
*** empty log message ***
Diffstat (limited to 'apps/windoze/swwinlog.cpp')
-rw-r--r--apps/windoze/swwinlog.cpp74
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);
+ }
+}