use Win32::GUI;

$M = new Win32::GUI::DialogBox(
		-name	=> "MainWindow",
		-left	=> 100,
		-top	=> 100,
		-width	=> 300,
		-height => 200,
		-text	=> "Testing",
		-style	=> WS_BORDER | WS_CAPTION,
	);

$M->AddTextfield(
		-name   => "txtText",
		-left   => 30,
		-top    => 30,
		-width	=> 100,
		-height	=> 22,
	);		

$M->AddRichEdit(
		-name   => "rchText",
		-left   => 30,
		-top    => 60,
		-width	=> 100,
		-height	=> 22,
	);		



$M->AddButton(
		-name	=> "cmdEnter",
		-left	=> 30,
		-top	=> 140,
		-width	=> 100,
		-text	=> "Enter",
		-tabstop => 1,
	);


$M->AddButton(
		-name	=> "cmdExit",
		-left	=> 170,
		-top	=> 140,
		-width	=> 100,
		-text	=> "Exit",
		-tabstop => 1,
	);

$M->Show;

Win32::GUI::Dialog();

sub cmdEnter_Click {

	$M->txtText->Disable();
	$M->rchText->Disable();

}

sub cmdExit_Click {
	
	return -1;
	
}

