Dialog Box Editor - readme file for version 2.3
===============================================

Introduction
============

DBE's purpose is to help you create mIRC 5.61+ dialog box tables.

DBE provides a graphical user interface in which you can:

        - create dialog box objects (like check boxes and radio buttons) by
          using drag and drop
        - resize and move the dialog box objects
        - specify dialog box properties like dialog name and title
        - specify dialog object properties like disable, hide and sort.

DBE creates and reads .mdt (mirc dialog table) files.  You use the .mdt files
by either pasting them into your scripts or having your scripts load them via
the /load -rs command.


Install
=======

1. Unzip dbe.zip TO ITS OWN MIRC SUB-DIRECTORY called dbe.  You will get
errors if you try to use it from anywhere else.  It must be installed in
$mircdirdbe.

Let's assume it's c:\mirc\dbe. This will create 19 files: dbe.mrc,
dbeprops.mrc, dbeicon.bmp, dbevers.txt, and this file, dbe.txt, and a bunch of
.mdt files.

dbe.mrc is the main script file.  When you load it, it automatically loads
dbeprops.mrc.  The dbeicon.bmp file is a small bit map that DBE uses in its
tools window to represent icon objects.  The .mdt files are various dialog
tables DBE uses.

2. Load DBE: /load -rs c:\mirc\dbe\dbe.mrc.  When you load DBE it
automatically loads dbeprops.mrc.

DBE will create a DBE sub-menu on the mirc Command menu.  This menu has four
items:  Edit dialog, Configure, Uninstall, and About.  Edit dialog starts the
dialog box editor.  Configure lets you set the grid size and enable or disable
the "snap to grid" feature.  Uninstall completely uninstalls DBE.  About shows
the DBE version number in the status window.


Running DBE
===========

You can run DBE two ways; either select Command/DBE/Edit dialog from mIRC
Command menu or run the dbe alias by typing /dbe in any window.

When invoked, DBE will display a list of all the .mdt files it finds in the
directory it is running in ($scriptdir).  You can either select an .mdt file
or type in a filename to have DBE create a new one.


DBE Windows
===========

DBE will display two windows.

The left one is the DBE Edit window.  It contains the dialog box you are
creating or editing.  It will have a background grid of dots.  By default
these dots are spaced 10 pixels apart in both the horizontal and vertical
directions but you can change that by using the Configure menu as described
above.  The grid helps you to align the items in your dialog box.  The
Configure menu also lets you enable or disable the "snap to grid" feature.
This feature positions the upper left corner of a dialog box object on the
closest grid dot.

The right window is the DBE Tools window.  It contains dialog box objects like
a check box, a radio button, etc.  The object at the bottom of the window, the
colored DBE square, represents an icon object.

DBE also creates two hidden windows: dialogg and dialogs.  dialogg contains
the grid which DBE uses when it needs to erase an object.  dialogs is used to
save dialog box objects during editing.


Using DBE
=========

Create Object - To create a dialog box object, left click on an object in the
tools window and drag it to the edit window.  You won't see the object move
but, when you release the mouse button the object will appear.  The objects
upper left corner will be at the position of the mouse pointer when you
release the button.  When you create an icon object DBE will popup a dialog
where you can select the icon file.

Move Object - left click on an object and drag it.

Resize Object - hold the control key down while pressing the left mouse button
on an object and drag a side.  A green line will appear on the side closest to
the mouse pointer.  This indicates the side that will move.  You can drag the
green side to make the object larger or smaller.

Set Object Properties - double left click on an object.  This will bring up a
dialog box where you can set the object's properties such as its id, text,
style, etc.

Set Dialog Properties - double click in an empty space in the dialog box (not
on an object).  This will pop up a dialog box where you can set the name,
title, and option properties.  I've heard of users using several option
statements in one dialog table but DBE only supports one.

Delete Object - right click on an object and select delete from the popup menu.

Copy Object - right click on an object and select copy from the popup menu.
This copies the object to an internal "clipboard" so you can paste the object
somewhere else.

Paste Object - right click anywhere and select paste from the popup menu.
This will paste the previously copied object to the current mouse cursor
location (or grid pixel if snap to grid is enabled).

Save - right click anywhere and select save from the popup menu.  DBE will
save the dialog box to the current .mdt file.

Save as - right click anywhere and select save as from the popup menu.  DBE
will ask for a filename and then save the dialog box to the specified file
which becomes the current filename.

Close - right click anywhere and select close from the popup menu.  DBE will
close.  Be sure to save your dialog box before you close.

Refresh - right click anywhere and select refresh from the popup menu.  DBE
will redraw the dialog box.  Sometimes the window can get cluttered with left
over garbage when moving and resizing.  I can't help this because mIRC doesn't
give an event in this situation.

Test - right click anywhere and select test from the popup menu.  DBE will
have mIRC run your current dialog box so you can see what it will look like.
Just press your Ok or Cancel button to terminate the test.

NOTE: DO NOT TEST unless you have an Ok and/or Cancel button because you will
get a:  * /dialog: 'dbetest' invalid table
message!  Every dialog box must have at least an Ok or Cancel button.

Details - right click on an object and select Details from the popup menu. DBE
will display a read-only dialog box showing details of the object such as its
x and y position and its width and height in pixels.

Grouping - You can move and delete multiple objects.  Just left click outside
of any object and drag the mouse.  A red box will appear and grow to encompass
objects. Release the button and the encompassed objects will be surrounded by
a green box which indicates a group object.  You can move the group object
around just like any other object.  You must ungroup the group object to
restore the individual objects. Just right click on the group object and
select Ungroup from the popup menu. DBE only supports one group at a time for
now and you CAN'T copy/paste groups or double click on them.


Notes About Icon and Bit Map Files
==================================

First of all, I haven't found an icon file that mIRC will display in a dialog
box.  All of the icon files I've tried result in an error message like:
	* /dialog: 'test' error loading 'c:\windows\web\biz.ico'
If anyone finds an icon file that mIRC will display please send it to me.

The second note is about .ico and .bmp filenames.  The mIRC helpfile shows the
syntax of the icon dialog box object as:
	icon id, x y w h, filename, index
The filename can be specified with an absolute or relative pathname.  An
absolute pathname includes drive, directory, and filename.  An example is:
	c:\mirc\dbe\dbeicon.bmp
A relative pathname includes a filename and may include a sub-directory name.
Examples of these are:
	dbeicon.bmp
	dbe\dbeicon.bmp

When mIRC goes to display a dialog box it checks the filenames of any icon
object in the dialog table. If the filename has an absolute pathname then
mIRC will use it as is.  On the other hand, if it has a relative path then
mIRC will prefix it with $mircdir.

What all this means is... if you can guarantee that all of your users will
install your script on the same drive and in the same directory then use
absolute pathnames.  Otherwise tell your users to install your script in a
sub-directory of mirc and use relative pathnames.


A Note About List Boxes And Drop Down Combo Boxes
=================================================

mIRC displays the height of these boxes in multiples of the current font size.

DBE shows these boxes as follows:  First it draws a solid black rectangle
around the part that mIRC will display.  Then it draws a dashed "focus box"
around the remaining part that mIRC won't display.  If you want your objects
to be as close together as possible then move other objects into the focus box
area or size the list box or combo box so the focus box disappears.

