Load enable.ide & run it for a demo

Files:enabledl.cpp & enabledl.h

Classes
=======

TMixInEnableDialog:
-------------------
MixIn class to add Idle Processing/Command Enabling/Ballon Help
to existing dialogs

TEnableDialog:
-------------
Base enable dialog class, can be used as a base for new classes.

These two classes are derived from Ian Spencers Begin/EndModal ecapsulation
that enables modal dialogs to process idle message & Bob Arson's article in
Windows/DOS Developers Journal (Vol6, No 1) on OWL command enablers for
controls in dialogs, plus some extra stuff of my own! (Balloon help).

All this enables modal dialogs to process idle messages.

Command Enabling:
=================
Now any control in a dialog can have a Command Enabler associated with it.
Just add a OWL interface element and a EV_COMMAND_ENABLE macro in the response table,
e.g.

DEFINE_RESPONSE_TABLE1(TTestDialog, TEnableDialog)
	EV_COMMAND_ENABLE(IDOK,CeOk),
END_RESPONSE_TABLE;

// TEnableDialog constructor....
{
	....
	new TButton(this,IDOK);
	....
};


void TTestDialog::CeOk(TCommandEnabler& ce)
{
	BOOL enable = IsDlgButtonChecked(IDC_ENABLEOK) &&
		::GetWindowTextLength(GetDlgItem(IDC_AMOUNT)) > 0;
	ce.Enable(enable);
};

And the Ok button will be automatically enabled/disabled as the dialog is edited.


Balloon Help:
=============
Now any control can have Ballon Help (a.k.a. Macintosh System 7) popup as
the mouse moves over it. This help can be any length and multiline.
You don't need a OWL interface element for the control, but you do need a Id for it.
e.g.

// TEnableDialog constructor....
{
	....
	AddHelp(IDOK,"Ok\r\nDont Press this\r\nUntil 'Enable Ok' is checked\r\nand Amount is filled in");
	....
}

Future:
=======
balloon help loading from resources via RCDATA statements, based
on the Dialog & Control Id, plus writing a editor for this.

Auto resizing and placement of controls as in TurboVision,
e.g. add Statements such as this in your Dialog Constructor
AddSize(IDOK,AnchorDown | AnchorRight);
AddSize(IDC_EDIT1,AnchorDown | GrowRight);
Great for mdi dialogs



Thanks:
=======
Ian Spencers for the Idle <wg> dialogs.
Bob Arnson for the command enabling
Steve Saxon for the generally excellent propdlg & tfarry's

I welcome feedback, critiques & suggestions.
Contact me (via the forum please) on 100060,1147
Lindsay Mathieson
