#ifndef MAKE_ID
#define MAKE_ID(a,b,c,d) ((ULONG) (a)<<24 | (ULONG) (b)<<16 | (ULONG) (c)<<8 | (ULONG) (d))
#endif

#ifdef _DCC
#define __inline
#endif

#include "Dizzer_II_MUI.h"
#include "Dizzer_II_MUIExtern.h"


struct ObjApp * CreateApp(void)
{
	struct ObjApp * Object;

	APTR	Master_Group, Spacing_Group, Main_Controls, Sizes, Total_Files_Label;
	APTR	Total_Size_Label, Total_Compression_Label, Top_Button_Group, Base_Functions;
	APTR	DIZ_Lists, Archive_Functions, Preferences, LIST_LABEL, Main_Information_Group;
	APTR	Text_Information_Group, Name_Label, Type_Label, Size_Label, Date_Label;
	APTR	Path_Label, Button_Group, God_Group, Master_Layout, GR_grp_16, Progress_Scale;
	APTR	Main_Requester_Group, Buttons, Requester_Layout, L1, COL_Group, Checks;
	APTR	L2, L3, L4, Radio_Group, Main_Buttons, HSpave, GROUP_ROOT_6;
	static const struct Hook Main_Lister_ConstructHook = { { NULL,NULL },(VOID *)Main_Lister_Construct,NULL,NULL };
	static const struct Hook Main_Lister_DestructHook = { { NULL,NULL },(VOID *)Main_Lister_Destruct,NULL,NULL };
	static const struct Hook Main_Lister_DisplayHook = { { NULL,NULL },(VOID *)Main_Lister_Display,NULL,NULL };
	static const struct Hook Main_Lister_DoubleClickHook = { { NULL,NULL },(VOID *)Main_Lister_DoubleClick,NULL,NULL };
	static const struct Hook Button_CreateBaseHook = { { NULL,NULL },(VOID *)Button_CreateBase,NULL,NULL };
	static const struct Hook Button_HardCopyHook = { { NULL,NULL },(VOID *)Button_HardCopy,NULL,NULL };
	static const struct Hook Button_OpenListerHook = { { NULL,NULL },(VOID *)Button_OpenLister,NULL,NULL };
	static const struct Hook Button_ArchiveExtractHook = { { NULL,NULL },(VOID *)Button_ArchiveExtract,NULL,NULL };
	static const struct Hook Button_ArchiveInformationHook = { { NULL,NULL },(VOID *)Button_ArchiveInformation,NULL,NULL };
	static const struct Hook Button_ArchiveDirectoryHook = { { NULL,NULL },(VOID *)Button_ArchiveDirectory,NULL,NULL };
	static const struct Hook Button_ArchiveDeleteHook = { { NULL,NULL },(VOID *)Button_ArchiveDelete,NULL,NULL };
	static const struct Hook Button_LoadBaseHook = { { NULL,NULL },(VOID *)Button_LoadBase,NULL,NULL };
	static const struct Hook Button_SaveBaseHook = { { NULL,NULL },(VOID *)Button_SaveBase,NULL,NULL };
	static const struct Hook ABORTHook = { { NULL,NULL },(VOID *)ABORT,NULL,NULL };
	static const struct Hook Button_NormalFindHook = { { NULL,NULL },(VOID *)Button_NormalFind,NULL,NULL };
	static const struct Hook Main_Lister_ActiveChangedHook = { { NULL,NULL },(VOID *)Main_Lister_ActiveChanged,NULL,NULL };
	static const struct Hook Found_Lister_ChangeActiveHook = { { NULL,NULL },(VOID *)Found_Lister_ChangeActive,NULL,NULL };
	static const struct Hook Main_Lister_CompareHook = { { NULL,NULL },(VOID *)Main_Lister_Compare,NULL,NULL };


	if (!(Object = AllocVec(sizeof(struct ObjApp), MEMF_PUBLIC|MEMF_CLEAR)))
		return(NULL);

	Object->STR_Total_Files_Label = "Files";
	Object->STR_Total_Size_Label = "Size";
	Object->STR_Total_Compression_Label = "Compressed";
	Object->STR_Total_Files = NULL;
	Object->STR_Total_Size = NULL;
	Object->STR_Total_Compression = NULL;
	Object->STR_Archive_Name = NULL;
	Object->STR_Archive_Type = NULL;
	Object->STR_Archive_Size = NULL;
	Object->STR_Archive_Date = NULL;
	Object->STR_Archive_Path = NULL;
	Object->STR_L1 = "Please Enter Text To Search For...";
	Object->STR_L2 = "Case insensitive";
	Object->STR_L3 = "Wildcard search";
	Object->STR_L4 = "Match whole words";

	Object->List_FormatContent[0] = "Standard";
	Object->List_FormatContent[1] = "Ami Express";
	Object->List_FormatContent[2] = "Plain List";
	Object->List_FormatContent[3] = "Old Dizzer";
	Object->List_FormatContent[4] = NULL;
	Object->Main_RadioContent[0] = "Ask";
	Object->Main_RadioContent[1] = "Leave Selected";
	Object->Main_RadioContent[2] = "Output Results";
	Object->Main_RadioContent[3] = NULL;

	Object->Main_Lister = ListObject,
		MUIA_Background, MUII_ButtonBack,
		MUIA_Frame, MUIV_Frame_InputList,
		MUIA_List_AdjustWidth, TRUE,
		MUIA_List_CompareHook, &Main_Lister_CompareHook,
		MUIA_List_ConstructHook, &Main_Lister_ConstructHook,
		MUIA_List_DestructHook, &Main_Lister_DestructHook,
		MUIA_List_DisplayHook, &Main_Lister_DisplayHook,
	End;

	Object->Main_Lister = ListviewObject,
		MUIA_Listview_List, Object->Main_Lister,
	End;

	Total_Files_Label = TextObject,
		MUIA_FramePhantomHoriz, TRUE,
		MUIA_Weight, 30,
		MUIA_Background, MUII_WindowBack,
		MUIA_Frame, MUIV_Frame_Text,
		MUIA_Text_Contents, Object->STR_Total_Files_Label,
		MUIA_Text_SetMin, TRUE,
	End;

	Total_Size_Label = TextObject,
		MUIA_FramePhantomHoriz, TRUE,
		MUIA_Weight, 30,
		MUIA_Background, MUII_WindowBack,
		MUIA_Frame, MUIV_Frame_Text,
		MUIA_Text_Contents, Object->STR_Total_Size_Label,
		MUIA_Text_SetMin, TRUE,
	End;

	Total_Compression_Label = TextObject,
		MUIA_FramePhantomHoriz, TRUE,
		MUIA_Weight, 30,
		MUIA_Background, MUII_WindowBack,
		MUIA_Frame, MUIV_Frame_Text,
		MUIA_Text_Contents, Object->STR_Total_Compression_Label,
		MUIA_Text_SetMin, TRUE,
	End;

	Object->Total_Files = TextObject,
		MUIA_Background, MUII_TextBack,
		MUIA_Frame, MUIV_Frame_InputList,
		MUIA_Text_Contents, Object->STR_Total_Files,
		MUIA_Text_SetMin, TRUE,
	End;

	Object->Total_Size = TextObject,
		MUIA_Background, MUII_ButtonBack,
		MUIA_Frame, MUIV_Frame_InputList,
		MUIA_Text_Contents, Object->STR_Total_Size,
		MUIA_Text_SetMin, TRUE,
	End;

	Object->Total_Compression = TextObject,
		MUIA_Background, MUII_ButtonBack,
		MUIA_Frame, MUIV_Frame_InputList,
		MUIA_Text_Contents, Object->STR_Total_Compression,
		MUIA_Text_SetMin, TRUE,
	End;

	Sizes = GroupObject,
		MUIA_Background, MUII_ButtonBack,
		MUIA_Frame, MUIV_Frame_InputList,
		MUIA_Group_Columns, 3,
		MUIA_Group_VertSpacing, 0,
		Child, Total_Files_Label,
		Child, Total_Size_Label,
		Child, Total_Compression_Label,
		Child, Object->Total_Files,
		Child, Object->Total_Size,
		Child, Object->Total_Compression,
	End;

	Object->Create_Base = SimpleButton("Create _Base");

	Object->Find_File = TextObject,
		ButtonFrame,
		MUIA_Background, MUII_ButtonBack,
		MUIA_ControlChar, 'b',
		MUIA_Text_Contents, "Find File",
		MUIA_Text_PreParse, "\033c",
		MUIA_Text_HiChar, 'b',
		MUIA_InputMode, MUIV_InputMode_RelVerify,
	End;

	Base_Functions = GroupObject,
		MUIA_Group_Columns, 2,
		Child, Object->Create_Base,
		Child, Object->Find_File,
	End;

	Object->HardCopys = TextObject,
		ButtonFrame,
		MUIA_Background, MUII_ButtonBack,
		MUIA_ControlChar, 'b',
		MUIA_Text_Contents, "HardCopy",
		MUIA_Text_PreParse, "\033c",
		MUIA_Text_HiChar, 'b',
		MUIA_InputMode, MUIV_InputMode_RelVerify,
	End;

	Object->Open_Lister = TextObject,
		ButtonFrame,
		MUIA_Background, MUII_ButtonBack,
		MUIA_ControlChar, 'b',
		MUIA_Text_Contents, "List",
		MUIA_Text_PreParse, "\033c",
		MUIA_Text_HiChar, 'b',
		MUIA_InputMode, MUIV_InputMode_RelVerify,
	End;

	DIZ_Lists = GroupObject,
		MUIA_Group_Columns, 2,
		Child, Object->HardCopys,
		Child, Object->Open_Lister,
	End;

	Object->Archive_Extract = TextObject,
		ButtonFrame,
		MUIA_Background, MUII_ButtonBack,
		MUIA_ControlChar, 'b',
		MUIA_Text_Contents, "Extract",
		MUIA_Text_PreParse, "\033c",
		MUIA_Text_HiChar, 'b',
		MUIA_InputMode, MUIV_InputMode_RelVerify,
	End;

	Object->Archive_Information = TextObject,
		ButtonFrame,
		MUIA_Background, MUII_ButtonBack,
		MUIA_ControlChar, 'b',
		MUIA_Text_Contents, "Information",
		MUIA_Text_PreParse, "\033c",
		MUIA_Text_HiChar, 'b',
		MUIA_InputMode, MUIV_InputMode_RelVerify,
	End;

	Object->Archive_Directory = TextObject,
		ButtonFrame,
		MUIA_Background, MUII_ButtonBack,
		MUIA_ControlChar, 'b',
		MUIA_Text_Contents, "Directory",
		MUIA_Text_PreParse, "\033c",
		MUIA_Text_HiChar, 'b',
		MUIA_InputMode, MUIV_InputMode_RelVerify,
	End;

	Object->Archive_Delete = TextObject,
		ButtonFrame,
		MUIA_Background, MUII_ButtonBack,
		MUIA_ControlChar, 'b',
		MUIA_Text_Contents, "Delete",
		MUIA_Text_PreParse, "\033c",
		MUIA_Text_HiChar, 'b',
		MUIA_InputMode, MUIV_InputMode_RelVerify,
	End;

	Object->Load_Base = SimpleButton("Load _Base");

	Object->Save_Base = SimpleButton("Save _Base");

	Archive_Functions = GroupObject,
		MUIA_Group_Columns, 2,
		Child, Object->Archive_Extract,
		Child, Object->Archive_Information,
		Child, Object->Archive_Directory,
		Child, Object->Archive_Delete,
		Child, Object->Load_Base,
		Child, Object->Save_Base,
	End;

	Top_Button_Group = GroupObject,
		MUIA_Weight, 30,
		MUIA_Background, MUII_ButtonBack,
		MUIA_Frame, MUIV_Frame_InputList,
		Child, Base_Functions,
		Child, DIZ_Lists,
		Child, Archive_Functions,
	End;

	Object->Information = GroupObject,
		MUIA_Weight, 30,
		MUIA_Frame, MUIV_Frame_Group,
		MUIA_Group_Columns, 2,
	End;

	LIST_LABEL = Label("List Format");

	Object->List_Format = CycleObject,
		MUIA_Cycle_Entries, Object->List_FormatContent,
	End;

	Preferences = GroupObject,
		MUIA_Weight, 30,
		MUIA_Background, MUII_ButtonBack,
		MUIA_Frame, MUIV_Frame_InputList,
		MUIA_Group_Columns, 2,
		Child, LIST_LABEL,
		Child, Object->List_Format,
	End;

	Main_Controls = GroupObject,
		MUIA_Weight, 10,
		MUIA_Background, MUII_ButtonBack,
		MUIA_Frame, MUIV_Frame_Group,
		Child, Sizes,
		Child, Top_Button_Group,
		Child, Object->Information,
		Child, Preferences,
	End;

	Spacing_Group = GroupObject,
		MUIA_Frame, MUIV_Frame_Group,
		MUIA_Group_Horiz, TRUE,
		Child, Object->Main_Lister,
		Child, Main_Controls,
	End;

	Master_Group = GroupObject,
		MUIA_Frame, MUIV_Frame_Group,
		Child, Spacing_Group,
	End;

	Object->Main_Window = WindowObject,
		MUIA_Window_Title, "Dizzer II",
		MUIA_Window_ID, MAKE_ID('0', 'W', 'I', 'N'),
		MUIA_Window_AppWindow, TRUE,
		WindowContents, Master_Group,
	End;

	Name_Label = Label("Archive Name");

	Object->Archive_Name = TextObject,
		MUIA_Background, MUII_TextBack,
		MUIA_Frame, MUIV_Frame_Text,
		MUIA_Text_Contents, Object->STR_Archive_Name,
		MUIA_Text_SetMin, TRUE,
	End;

	Type_Label = Label("Archive Type");

	Object->Archive_Type = TextObject,
		MUIA_Background, MUII_TextBack,
		MUIA_Frame, MUIV_Frame_Text,
		MUIA_Text_Contents, Object->STR_Archive_Type,
		MUIA_Text_SetMin, TRUE,
	End;

	Size_Label = Label("Archive Size");

	Object->Archive_Size = TextObject,
		MUIA_Background, MUII_TextBack,
		MUIA_Frame, MUIV_Frame_Text,
		MUIA_Text_Contents, Object->STR_Archive_Size,
		MUIA_Text_SetMin, TRUE,
	End;

	Date_Label = Label("Archive Date");

	Object->Archive_Date = TextObject,
		MUIA_Background, MUII_TextBack,
		MUIA_Frame, MUIV_Frame_Text,
		MUIA_Text_Contents, Object->STR_Archive_Date,
		MUIA_Text_SetMin, TRUE,
	End;

	Path_Label = Label("Archive Path");

	Object->Archive_Path = TextObject,
		MUIA_Background, MUII_TextBack,
		MUIA_Frame, MUIV_Frame_Text,
		MUIA_Text_Contents, Object->STR_Archive_Path,
		MUIA_Text_SetMin, TRUE,
	End;

	Text_Information_Group = GroupObject,
		MUIA_Group_Columns, 2,
		Child, Name_Label,
		Child, Object->Archive_Name,
		Child, Type_Label,
		Child, Object->Archive_Type,
		Child, Size_Label,
		Child, Object->Archive_Size,
		Child, Date_Label,
		Child, Object->Archive_Date,
		Child, Path_Label,
		Child, Object->Archive_Path,
	End;

	Object->Main_Information_List = FloattextObject,
		MUIA_Frame, MUIV_Frame_InputList,
	End;

	Object->Main_Information_List = ListviewObject,
		MUIA_Listview_Input, FALSE,
		MUIA_Listview_List, Object->Main_Information_List,
	End;

	Object->Information_Extract = TextObject,
		ButtonFrame,
		MUIA_Background, MUII_ButtonBack,
		MUIA_ControlChar, 'b',
		MUIA_Text_Contents, "Extract",
		MUIA_Text_PreParse, "\033c",
		MUIA_Text_HiChar, 'b',
		MUIA_InputMode, MUIV_InputMode_RelVerify,
	End;

	Object->Information_Information = TextObject,
		ButtonFrame,
		MUIA_Background, MUII_ButtonBack,
		MUIA_ControlChar, 'b',
		MUIA_Text_Contents, "Information",
		MUIA_Text_PreParse, "\033c",
		MUIA_Text_HiChar, 'b',
		MUIA_InputMode, MUIV_InputMode_RelVerify,
	End;

	Object->Information_Delete = TextObject,
		ButtonFrame,
		MUIA_Background, MUII_ButtonBack,
		MUIA_ControlChar, 'b',
		MUIA_Text_Contents, "Delete",
		MUIA_Text_PreParse, "\033c",
		MUIA_Text_HiChar, 'b',
		MUIA_InputMode, MUIV_InputMode_RelVerify,
	End;

	Object->Information_Cancel = TextObject,
		ButtonFrame,
		MUIA_Background, MUII_ButtonBack,
		MUIA_ControlChar, 'b',
		MUIA_Text_Contents, "Cancel",
		MUIA_Text_PreParse, "\033c",
		MUIA_Text_HiChar, 'b',
		MUIA_InputMode, MUIV_InputMode_RelVerify,
	End;

	Button_Group = GroupObject,
		MUIA_Group_Horiz, TRUE,
		Child, Object->Information_Extract,
		Child, Object->Information_Information,
		Child, Object->Information_Delete,
		Child, Object->Information_Cancel,
	End;

	Main_Information_Group = GroupObject,
		Child, Text_Information_Group,
		Child, Object->Main_Information_List,
		Child, Button_Group,
	End;

	Object->Archive_Information_Window = WindowObject,
		MUIA_Window_Title, "Information",
		MUIA_Window_ID, MAKE_ID('1', 'W', 'I', 'N'),
		MUIA_Window_DepthGadget, FALSE,
		WindowContents, Main_Information_Group,
	End;

	Object->Progress_Gauge = GaugeObject,
		GaugeFrame,
		MUIA_FixHeight, 10,
		MUIA_Gauge_Horiz, TRUE,
		MUIA_Gauge_InfoText, "No File!",
		MUIA_Gauge_Max, 100,
	End;

	Progress_Scale = ScaleObject,
		MUIA_Scale_Horiz, TRUE,
	End;

	GR_grp_16 = GroupObject,
		MUIA_Frame, MUIV_Frame_Group,
		Child, Object->Progress_Gauge,
		Child, Progress_Scale,
	End;

	Object->Abort = SimpleButton("Abort");

	Master_Layout = GroupObject,
		MUIA_Background, MUII_ListBack,
		MUIA_Frame, MUIV_Frame_Group,
		Child, GR_grp_16,
		Child, Object->Abort,
	End;

	God_Group = GroupObject,
		MUIA_Background, MUII_RequesterBack,
		Child, Master_Layout,
	End;

	Object->Progress_Window = WindowObject,
		MUIA_Window_Title, "Progress",
		MUIA_Window_ID, MAKE_ID('2', 'W', 'I', 'N'),
		MUIA_Window_CloseGadget, FALSE,
		MUIA_Window_DepthGadget, FALSE,
		WindowContents, God_Group,
	End;

	L1 = TextObject,
		MUIA_FramePhantomHoriz, TRUE,
		MUIA_Background, MUII_WindowBack,
		MUIA_Frame, MUIV_Frame_Text,
		MUIA_Text_Contents, Object->STR_L1,
		MUIA_Text_PreParse, "\033c",
		MUIA_Text_SetMin, TRUE,
	End;

	Object->Search_String = StringObject,
		MUIA_Frame, MUIV_Frame_String,
	End;

	Object->Check_Case = CheckMark(TRUE);

	L2 = TextObject,
		MUIA_FramePhantomHoriz, TRUE,
		MUIA_Background, MUII_WindowBack,
		MUIA_Frame, MUIV_Frame_Text,
		MUIA_Text_Contents, Object->STR_L2,
		MUIA_Text_PreParse, "\033l",
		MUIA_Text_SetMin, TRUE,
	End;

	Object->Check_Wildcard = CheckMark(FALSE);

	L3 = TextObject,
		MUIA_FramePhantomHoriz, TRUE,
		MUIA_Background, MUII_WindowBack,
		MUIA_Frame, MUIV_Frame_Text,
		MUIA_Text_Contents, Object->STR_L3,
		MUIA_Text_PreParse, "0\033l",
		MUIA_Text_SetMin, TRUE,
	End;

	Object->Check_WholeWords = CheckMark(FALSE);

	L4 = TextObject,
		MUIA_FramePhantomHoriz, TRUE,
		MUIA_Background, MUII_WindowBack,
		MUIA_Frame, MUIV_Frame_Text,
		MUIA_Text_Contents, Object->STR_L4,
		MUIA_Text_PreParse, "\033l",
		MUIA_Text_SetMin, TRUE,
	End;

	Checks = GroupObject,
		MUIA_Group_Columns, 2,
		Child, Object->Check_Case,
		Child, L2,
		Child, Object->Check_Wildcard,
		Child, L3,
		Child, Object->Check_WholeWords,
		Child, L4,
	End;

	Object->Main_Radio = RadioObject,
		MUIA_Radio_Entries, Object->Main_RadioContent,
	End;

	Radio_Group = GroupObject,
		Child, Object->Main_Radio,
	End;

	COL_Group = GroupObject,
		MUIA_ShowMe, FALSE,
		MUIA_Group_Columns, 2,
		Child, Checks,
		Child, Radio_Group,
	End;

	Requester_Layout = GroupObject,
		MUIA_Background, MUII_ButtonBack,
		MUIA_Frame, MUIV_Frame_ReadList,
		Child, L1,
		Child, Object->Search_String,
		Child, COL_Group,
	End;

	Object->Requester_OK = SimpleButton("OK");

	HSpave = HSpace(0);

	Object->Requester_Cancel = SimpleButton("Cancel");

	Main_Buttons = GroupObject,
		MUIA_Group_Columns, 3,
		Child, Object->Requester_OK,
		Child, HSpave,
		Child, Object->Requester_Cancel,
	End;

	Buttons = GroupObject,
		Child, Requester_Layout,
		Child, Main_Buttons,
	End;

	Main_Requester_Group = GroupObject,
		MUIA_Background, MUII_RequesterBack,
		Child, Buttons,
	End;

	Object->Search_Window = WindowObject,
		MUIA_Window_Title, "Search Requester",
		MUIA_Window_ID, MAKE_ID('3', 'W', 'I', 'N'),
		MUIA_Window_CloseGadget, FALSE,
		MUIA_Window_DepthGadget, FALSE,
		MUIA_Window_SizeGadget, FALSE,
		WindowContents, Main_Requester_Group,
	End;

	Object->Found_Lister = ListObject,
		MUIA_Frame, MUIV_Frame_InputList,
	End;

	Object->Found_Lister = ListviewObject,
		MUIA_Listview_DoubleClick, TRUE,
		MUIA_Listview_Input, FALSE,
		MUIA_Listview_List, Object->Found_Lister,
	End;

	GROUP_ROOT_6 = GroupObject,
		Child, Object->Found_Lister,
	End;

	Object->FoundLister_Window = WindowObject,
		MUIA_Window_Title, "Found the Following:",
		MUIA_Window_ID, MAKE_ID('4', 'W', 'I', 'N'),
		WindowContents, GROUP_ROOT_6,
	End;

	Object->App = ApplicationObject,
		MUIA_Application_Author, "Cray-1",
		MUIA_Application_Base, "DIZZ",
		MUIA_Application_Title, "Dizzer II",
		MUIA_Application_Version, "$VER: Dizzer II 1.04 (12.07.95)",
		MUIA_Application_Copyright, "Big Time Digital Design.",
		MUIA_Application_Description, "File_ID.diz Extractor Delux",
		SubWindow, Object->Main_Window,
		SubWindow, Object->Archive_Information_Window,
		SubWindow, Object->Progress_Window,
		SubWindow, Object->Search_Window,
		SubWindow, Object->FoundLister_Window,
	End;


	if (!Object->App)
	{
		FreeVec(Object);
		return(NULL);
	}

	DoMethod(Object->Main_Window,
		MUIM_Notify, MUIA_Window_CloseRequest, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, MUIV_Application_ReturnID_Quit
		);

	DoMethod(Object->Main_Lister,
		MUIM_Notify, MUIA_Listview_DoubleClick, TRUE,
		Object->App,
		2,
		MUIM_CallHook, &Main_Lister_DoubleClickHook
		);

	DoMethod(Object->Main_Lister,
		MUIM_Notify, MUIA_List_Active, MUIV_EveryTime,
		Object->App,
		2,
		MUIM_CallHook, &Main_Lister_ActiveChangedHook
		);

	DoMethod(Object->Create_Base,
		MUIM_Notify, MUIA_Pressed, FALSE,
		Object->App,
		2,
		MUIM_CallHook, &Button_CreateBaseHook
		);

	DoMethod(Object->Find_File,
		MUIM_Notify, MUIA_Pressed, FALSE,
		Object->Search_Window,
		3,
		MUIM_Set, MUIA_Window_Open, TRUE
		);

	DoMethod(Object->HardCopys,
		MUIM_Notify, MUIA_Pressed, FALSE,
		Object->App,
		2,
		MUIM_CallHook, &Button_HardCopyHook
		);

	DoMethod(Object->Open_Lister,
		MUIM_Notify, MUIA_Pressed, FALSE,
		Object->App,
		2,
		MUIM_CallHook, &Button_OpenListerHook
		);

	DoMethod(Object->Archive_Extract,
		MUIM_Notify, MUIA_Pressed, FALSE,
		Object->App,
		2,
		MUIM_CallHook, &Button_ArchiveExtractHook
		);

	DoMethod(Object->Archive_Information,
		MUIM_Notify, MUIA_Pressed, FALSE,
		Object->App,
		2,
		MUIM_CallHook, &Button_ArchiveInformationHook
		);

	DoMethod(Object->Archive_Directory,
		MUIM_Notify, MUIA_Pressed, FALSE,
		Object->App,
		2,
		MUIM_CallHook, &Button_ArchiveDirectoryHook
		);

	DoMethod(Object->Archive_Delete,
		MUIM_Notify, MUIA_Pressed, FALSE,
		Object->App,
		2,
		MUIM_CallHook, &Button_ArchiveDeleteHook
		);

	DoMethod(Object->Load_Base,
		MUIM_Notify, MUIA_Pressed, FALSE,
		Object->App,
		2,
		MUIM_CallHook, &Button_LoadBaseHook
		);

	DoMethod(Object->Save_Base,
		MUIM_Notify, MUIA_Pressed, FALSE,
		Object->App,
		2,
		MUIM_CallHook, &Button_SaveBaseHook
		);

	DoMethod(Object->Main_Window,
		MUIM_Window_SetCycleChain, Object->Main_Lister,
		Object->Create_Base,
		Object->Find_File,
		Object->HardCopys,
		Object->Open_Lister,
		Object->Archive_Extract,
		Object->Archive_Information,
		Object->Archive_Directory,
		Object->Archive_Delete,
		Object->Load_Base,
		Object->Save_Base,
		Object->Information,
		Object->List_Format,
		0
		);

	DoMethod(Object->Archive_Information_Window,
		MUIM_Notify, MUIA_Window_CloseRequest, TRUE,
		Object->Archive_Information_Window,
		3,
		MUIM_Set, MUIA_Window_Open, FALSE
		);

	DoMethod(Object->Information_Cancel,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->Archive_Information_Window,
		3,
		MUIM_Set, MUIA_Window_Open, FALSE
		);

	DoMethod(Object->Archive_Information_Window,
		MUIM_Window_SetCycleChain, Object->Main_Information_List,
		Object->Information_Extract,
		Object->Information_Information,
		Object->Information_Delete,
		Object->Information_Cancel,
		0
		);

	DoMethod(Object->Abort,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_CallHook, &ABORTHook
		);

	DoMethod(Object->Progress_Window,
		MUIM_Window_SetCycleChain, Object->Abort,
		0
		);

	DoMethod(Object->Requester_OK,
		MUIM_Notify, MUIA_Pressed, FALSE,
		Object->Search_Window,
		3,
		MUIM_Set, MUIA_Window_Open, FALSE
		);

	DoMethod(Object->Requester_OK,
		MUIM_Notify, MUIA_Pressed, FALSE,
		Object->Search_Window,
		2,
		MUIM_CallHook, &Button_NormalFindHook
		);

	DoMethod(Object->Requester_Cancel,
		MUIM_Notify, MUIA_Pressed, FALSE,
		Object->Search_Window,
		3,
		MUIM_Set, MUIA_Window_Open, FALSE
		);

	DoMethod(Object->Search_Window,
		MUIM_Window_SetCycleChain, Object->Search_String,
		Object->Check_Case,
		Object->Check_Wildcard,
		Object->Check_WholeWords,
		Object->Main_Radio,
		Object->Requester_OK,
		Object->Requester_Cancel,
		0
		);

	DoMethod(Object->FoundLister_Window,
		MUIM_Notify, MUIA_Window_CloseRequest, TRUE,
		Object->FoundLister_Window,
		3,
		MUIM_Set, MUIA_Window_Open, FALSE
		);

	DoMethod(Object->Found_Lister,
		MUIM_Notify, MUIA_Listview_DoubleClick, TRUE,
		Object->App,
		2,
		MUIM_CallHook, &Found_Lister_ChangeActiveHook
		);

	DoMethod(Object->FoundLister_Window,
		MUIM_Window_SetCycleChain, Object->Found_Lister,
		0
		);


	return(Object);
}

void DisposeApp(struct ObjApp * Object)
{
	MUI_DisposeObject(Object->App);
	FreeVec(Object);
}
