//	Zinc Application Framework - W_ERROR1.CPP
//	COPYRIGHT (C) 1990-1999.  All Rights Reserved.
//	Zinc Software Incorporated.  Pleasant Grove, Utah  USA

#include <z_error.hpp>
#include <z_msgwin.hpp>

// ----- ZafErrorSystem ----------------------------------------------------

ZafDialogEvent ZafErrorSystem::ErrorMessage(ZafWindowObject *,
	const ZafIChar *title, ZafDialogFlags msgFlags, const ZafIChar *message)
{
	// Beep the system.
	Beep();

	// Report the message.
	ZafMessageWindow messageWindow(title, ZAF_HAND_ICON, msgFlags, ZAF_DIALOG_OK, ZAF_ITEXT("%s"), message);

	messageWindow.SetOwner(DynamicPtrCast(zafWindowManager->First(), ZafWindow));
	// Wait for a response.
	return (messageWindow.Control());
}

