Home

GetModDialog FrameWork:

Function GetModDialog: BOOLEAN;
VAR
	n,i,ID: LONGINT;

Procedure RunD(VAR i,data: LONGINT);
BEGIN
Case i OF
	SetupDialogC: BEGIN
		END;
	1: BEGIN
		END;
	OTHERWISE BEGIN
		END;
	END; {Case}
END;

BEGIN {Dialog Setup}
ID:=CreateLayout('Title',FALSE,'OK','Cancel');
{Add dialog elements}
SetFirstLayoutItem(ID,?);
{Complete layout commands}
GetRunDialog:=(1=RunLayoutDialog(ID,RunD));
END;
This is a framework and beginning code for setting up a modern dialog window.
Add your dialog elements and functions to this basic layout.
Dialog Function returns true if button 1 was clicked.

Usage:
IF GetModDialog THEN BEGIN
	{Only processes this if button 1 was clicked}
	END;