![]() 1. Start a quick non-project HLA program. |
| Contents | |
Next Section
![]() 3. Introduce the Debug mode and Debug Window. |
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' 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 any POLINK warnings. 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.