Quickstart guide to HIDE

This tutorial will show:
1. Start a quick non-project HLA program.
2. Show how to code a sample modular program using HLA units.
3. Indroduce the Debug mode and Debug Window.
4. A brief description of the resource editor.
5. At the end of this file are the full sources described here.

[1]
To type in quick programs without setting up a project:

1. Select Menu: File > New File
2. Type in your source-code.
3. Select Menu: Make > Build	(or F5 key)

Some limitations exist for code written without projects:
1.  Does not allow you to choose link options
2.  Only default libraries are linked: hlalib.lib, kernel32.lib,
	user32.lib,gdi32.lib
3.  No resource support.

Some of these limitations may be removed in a future version.

==================================================================
[2]
Creating Projects:

Projects allow for the full use of HIDE features.  You may use resources,
the resource editor, more link options, program with units.

To Create a project with units:

A tutorial on creating a DEMO modular project

1. Select Menu: Project > New Project
2. In 'Project Name' field, type "demo" 

Notice: 'Project Folder' field indicates where the project will be created.
	It cannot be altered at this time.

3. Select the following Folder Creation items:

	TEMP
	UNIT
	SRC
	RES

4. In "Project Type" select "Windows: Program or Unit"


This will cause several things to happen once the project is created:

	a) Creates a folder called 'Temp'.
	All temporary	files generated by compiling
	will be created here.

	b) Creates a folder called 'Units'.
	All .obj files generated by the compiler will
	be created here.

	c) Creates a folder called 'Src'.
	All general source files (.hla, .hhf) will
	be created here.

	d) Creates a folder called 'Res'.
	All resource related files (.rc, .res) will
	be created and maintained here.

	e) Instruct the linker to assemble a Windows GUI PE executable.

These things will happen automatically without further user input.

5. If the TreeView is not visible, activate it now by selecting menu:
   View > TreeView

6. Add a header file to the project:
	Select Menu: Project	> New File > Header
	Call the header 'demo'

Notice: the treeview will not update automatically yet, 
but the header is there, double click "Headers" in the treeview
to expand that section.

5. Doubleclick src\demo.hla in the treeview to activate its source
in the edit window.

6. Type in a basic program frame:

// demo code
program demo;
#include	("src\demo.hhf")

begin demo;

	w.MessageBox(NULL,"From demo.hla","DEMO",w.MB_OK);

end demo;
// =====================

7.Doubleclick src\demo.hhf from the treeview.  If this is not visible,
then first doubleclick the Headers folder to open it.

8. Type in the following code in src\demo.hhf

// demo header

#include ("w.hhf")

9. You are now ready for the first test compilation.
Select Menu: Make > Build

The output window will display some information.
Notice: you may ignore the POLINK warning.

You can even run it to display the message box:  Make > Run

10. Add a new unit:
Select Menu: Project > New File > 	HLA Unit
Type "DemoUnit" in the File name field of the Add File dialog.

Doubleclick on src\DemoUnit.hla to open it in the editor.
Type the following code:

// DemoUnit
unit DemoUnit;
#include ("src\demo.hhf")

procedure FromUnit;
begin FromUnit;

	w.MessageBox(NULL,"From DemoUnit","DEMO",w.MB_OK);

end FromUnit;

end DemoUnit;
// ===========================

10. Update the src\demo.hhf by adding this line of code:

procedure FromUnit;	@external;

11. Update the src\demo.hla source by adding this line of code
after w.MessageBox line:

call FromUnit;

12. Select Menu: Make > Build

13. Run it by selecting Menu: Make > Run
NOTE: You can Build & Run with one click: Make > Build & Run (or Sh.Alt F5)


If all went well, the demo program will launch and display 2 message
boxes, one from the main source, one from the unit.

Notice: You do not have to use modular units.  You can use 
mono-source, or even multiple HLA source files linked together via
include statements.

Adding Precompiled libraries or object files to your program:

Select Menu: Project > Add to Link List
These added files will be shown in the Libraries and Misc folders
of your project treeview.

Do NOT add hlalib.lib, kernel32.lib, user32.lib or gdi32.lib
These are already included by default in all projects.

======================================================================
[3]
Using the Debug Window.
Debug mode can be used either with or without projects.

1.Select: Tools > Debug Window
This will open the debug window.

To activate debug features, several other steps need to be taken.

2.Options > Compiler Settings
In the Output Version, select the Debug radiobutton. Then click Done.

3.Include the file "custom\dbgwin.hhf" in your src\demo.hhf header:

#include	("custom\dbgwin.hhf")


4.The debug window is used via series of macros in the dbgwin.hhf header
file.
Add a couple lines to try it out:

In src\demo.hla right after "begin demo" add the line
dbg.put("inside demo.hla");

In src\demounit.hla, right after "begin FromUnit" add
dbg.put("inside FromUnit procedure");

5. Rebuild the project by selecting: Make > ReBuild All

Now when you run the program, some information will be displayed 
in the Debug Window.  For other available macros, review the dbgwin.hhf
file.

==========================================================================
[5]
Using Resources:

Add a resource by selecting: Project > New File > Resource

Using the Resource Editor:
Tools > Resource Editor
If you start the resource editor without a resoruce file added to
your project, it will just launch the resource editor.  If you have added
a resource file to your project (via menu: Project > New File > Resource),
the resource editor will open and use that file.

==========================================================================

[6]

////////////////////////////////////////////////////////////////
// File: "demo.hla"
program demo;
#include	("src\demo.hhf")

begin demo;
	
	dbg.put("Inside demo.hla");
	w.MessageBox(NULL,"From demo.hla","DEMO",w.MB_OK);
	call FromUnit;
	
end demo;
///////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////
// File: "DemoUnit.hla"
unit demounit;
#include	("src\demo.hhf")
	
	procedure FromUnit;
	begin FromUnit;
	
		dbg.put("Inside FromUnit procedure");
		w.MessageBox(NULL,"From DemoUnit","DEMO",w.MB_OK);
		
	end FromUnit;

end demounit;
////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////
// File: "demo.hhf"
#include	("w.hhf")
#include	("custom\dbgwin.hhf")

procedure FromUnit;	@external;
///////////////////////////////////////////////////////////

