1. Technology
RTL reference|Glossary|Tips/Tricks|FREE App/VCL|Books|Link Back

A guide to developing Delphi programs in Windows API (without the use of the VCL)
Free online programming course for intermediate/advanced Delphi developers. Focus on raw Windows API programming.
Win prizes by sharing code!
Do you have some Delphi code you want to share? Are you interested in winning a prize for your work?
Delphi Programming Quickies Contest
Related Resources
Tutorials and articles
More Windows API related articles
Windows Shell related articles

About the course:
This free online course is perfect for intermediate Delphi developers as well as for those who want a broad overview of the art of Windows API programming with Borland Delphi.

The course is written by Wes Turner, and brought to you by Zarko Gajic

Overview:
The focus here is programming without Delphi's Visual Component Library (VCL) using Windows "Application Programming Interface" (API) functions to create applications without the Forms.pas unit, resulting in knowledge of the Windows programming interface and smaller executable's file size. There are always a variety of ways to code things, the chapters of this course are meant to help those developers that did not learn the windows API functions for window creation and messaging as they are not covered in Delphi Rapid Application Development (RAD) instructions.

This Guide is about developing Delphi programs without the "Forms" and "Controls" units or any of the Component Library. You will be shown how to create windows classes and windows, how to use the "Message Loop" to pass messages to the WndProc message handling function, etc...

Introduction:
Delphi is an excellent rapid application development (RAD) tool and can produce outstanding programs. Delphi users will notice that most of the Windows API code is hidden from them, and handled in the background in the "Forms" and "Controls" units. Many Delphi developers think they are programming in "Windows" environment, when they are really working in "Delphi" environment with Delphi code "wrappers" for the Windows API functions. When you need more programming options than is offered in the Object Inspector or component (VCL) methods, it becomes necessary to use Windows API to accomplish these options. As your programming goals become more specialized you may find that the click and double click ease of the Delphi VCL will not have the variety and creativity needed for unique methods and visual display, requiring your API knowledge for a lager variety of programming tools.

The file size of a "standard" Delphi application is at least 250 Kb, due to the "Forms" unit, which will include a lot of code that may not be needed. Without the "Forms" unit, developing in API means that you will be coding in the .dpr (program) unit of your app. There will not be a usable Object Inspector or any components, this is NOT RAD, it is slow and there is no visual "Form" to see during development. But by learning how to do this you will begin to see how the Windows OS operates and uses window creation options and windows "messages" to do things. This is very useful in Delphi RAD with the VCL, and almost essential for VCL component development. If you can find the time and patients to learn about windows messages and message handling methods, you will greatly increase your ability to use Delphi, even if you don't use any API calls and only program with the VCL.

Prerequisites:
Readers should be experienced in developing Windows applications. It would be good if you are familiar with general Delphi coding methods (for loops, typecasting, case statements, etc).
Chapters:
You can find the latest chapters located at the bottom of this page!
The chapters of this course are being created and updated dynamically on this site. Chapters (for now) include:

CHAPTER 1:
Reading C code in Win32 API
When you read the Win32 API help, you see that the "C" language syntax is used. This article will help you learn the differences between the C language types and the Delphi language types.
Discuss about questions, comments, problems and solutions related to this chapter!


Get informed when the next chapter of this Course becomes available online:
Subscribe to the Newsletter
Name
Email

Got some code to share? Got a question? Need some help?

©2014 About.com. All rights reserved.