#ifndef _COMMON_LOGOWINDOW_HPP_
#define _COMMON_LOGOWINDOW_HPP_
#ifndef _COMMON_WINDOW_HPP_
#include <common/window.hpp>
#endif
#ifndef _COMMON_STRING_HPP_
#include <common/string.hpp>
#endif
#ifndef _COMMON_DRAWBITMAP_HPP_
#include <common/drawbmp.hpp>
#endif
#ifndef _COMMON_CURSORCONTROL_HPP_
#include <common/crsctrl.hpp>
#endif

class LogoWindow : public Window, public DrawBitmap, public CursorControl
{
public:
	LogoWindow(HINSTANCE hInstance,HINSTANCE hLibrary);
	virtual ~LogoWindow();
	WORD showLogo(String &logoBitmapName);
private:
	enum{TimerID=0x00,TimeOut=3000};
	static char smszClassName[];
	CallbackData::ReturnType createHandler(CallbackData &someCallbackData);
	CallbackData::ReturnType timerHandler(CallbackData &someCallbackData);
	CallbackData::ReturnType paintHandler(CallbackData &someCallbackData);
	CallbackData::ReturnType destroyHandler(CallbackData &someCallbackData);
	CallbackData::ReturnType closeHandler(CallbackData &someCallbackData);
	void registerClass(void);
	void paint()const;
	void messageLoop(void);
	void removeHandlers(void);

	Callback<LogoWindow> mCreateHandler;
	Callback<LogoWindow> mTimerHandler;
	Callback<LogoWindow> mPaintHandler;
	Callback<LogoWindow> mDestroyHandler;
	Callback<LogoWindow> mCloseHandler;
	HINSTANCE mhInstance;
	HINSTANCE mhLibrary;
	HBITMAP mhBitmap;
	WORD mIsDestroyed;
};
#endif