#include	"basewin.h"

#define		szTitleName		TEXT("POBox")
#define		szClassName		TEXT("KANJIIN")

#define		IDM_PEXCEL			(41258)
#define		IDM_UNKNOWN			(41259)
#define		IDM_FEPOK			(41260)
#define		IDM_ACTIVATE		(41261)
#define		IDM_FEPKEY			(41262)
#define		IDM_FEPCHAR			(41263)
#define		IDM_ACTIVATE_HWND	(41264)
#define		IDM_FEPGETMODE		(41265)
#define		IDM_FEPSETMODE		(41266)
#define		IDM_WMCHAR			(41267)
#define		IDM_EXPLORE			(1)

class MainWindow ;
class FepWindow ;

class MainApp {
private:
	HINSTANCE	m_hInst ;
	HACCEL		m_hAccl ;
	MainWindow	*m_pMainWnd ;
	FepWindow	*m_pFepWnd ;

public:
	MainApp() ;
	~MainApp() ;

	BOOL	Create( HINSTANCE hInst ) ;
	int		Run() ;
	BOOL	GetReg() ;
	void	SetReg() const ;
	void	DeleteReg() const ;

	HINSTANCE	get_inst() const {
		return m_hInst ;
	}
	MainWindow	*get_main() { return m_pMainWnd ; }
	FepWindow	*get_fep() { return m_pFepWnd ; }

	BOOL	check_next_key() const ;

	static	MainApp	*g_pApp ;
} ;

extern "C" {
	extern	TCHAR	MessageBuf[ 512 ] ;
	extern	BOOL	CheckExistingFep( void ) ;
	extern	DWORD	GetFontH( void ) ;
	extern	HWND	GetCenterWindow() ;
	extern	BOOL	check_next_key() ;
} ;
