aboutsummaryrefslogblamecommitdiffstats
path: root/apps/windoze/swwinlog.cpp
blob: cf7d8e8ab3a2322aedafc1f6c3779ec2faa15685 (plain) (tree)









































































                                                                             
//---------------------------------------------------------------------------
#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);
	}
}